ModelValidator Class


Provides a base class for implementing validation logic.

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

Inheritance Hierarchy



public abstract class ModelValidator
public ref class ModelValidator abstract 
type ModelValidator = class end
Public MustInherit Class ModelValidator


Name Description
System_CAPS_protmethod ModelValidator(ModelMetadata, ControllerContext)

Called from constructors in derived classes to initialize the ModelValidator class.


Name Description
System_CAPS_protproperty ControllerContext

Gets the controller context.

System_CAPS_pubproperty IsRequired

Gets or sets a value that indicates whether a model property is required.

System_CAPS_protproperty Metadata

Gets the metadata for the model validator.


Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetClientValidationRules()

When implemented in a derived class, returns metadata for client validation.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_static GetModelValidator(ModelMetadata, ControllerContext)

Returns a composite model validator for the model.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Validate(Object)

When implemented in a derived class, validates the object.

Thread Safety

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

See Also

System.Web.Mvc Namespace

Return to top