Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ModelValidator Class
Collapse the table of content
Expand the table of content

ModelValidator Class

Provides a base class for implementing validation logic.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public abstract class ModelValidator

The ModelValidator type exposes the following members.

Protected methodModelValidatorCalled from constructors in derived classes to initialize the ModelValidator class.

Protected propertyControllerContextGets the controller context.
Public propertyIsRequiredGets or sets a value that indicates whether a model property is required.
Protected propertyMetadataGets the metadata for the model validator.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetClientValidationRulesWhen implemented in a derived class, returns metadata for client validation.
Public methodGetHashCode (Inherited from Object.)
Public methodStatic memberGetModelValidatorReturns a composite model validator for the model.
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodValidateWhen implemented in a derived class, validates the object.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft