ModelValidator Class
Provides a base class for implementing validation logic.
System.Object
System.Web.Mvc.ModelValidator
System.Web.Mvc.DataAnnotationsModelValidator
System.Web.Mvc.ValidatableObjectAdapter
System.Web.Mvc.ModelValidator
System.Web.Mvc.DataAnnotationsModelValidator
System.Web.Mvc.ValidatableObjectAdapter
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The ModelValidator type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ModelValidator | Called from constructors in derived classes to initialize the ModelValidator class. |
| Name | Description | |
|---|---|---|
![]() | ControllerContext | Gets the controller context. |
![]() | IsRequired | Gets or sets a value that indicates whether a model property is required. |
![]() | Metadata | Gets the metadata for the model validator. |
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetClientValidationRules | When implemented in a derived class, returns metadata for client validation. |
![]() | GetHashCode | (Inherited from Object.) |
![]() ![]() | GetModelValidator | Returns a composite model validator for the model. |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
![]() | Validate | When implemented in a derived class, validates the object. |
Show:
.gif?cs-save-lang=1&cs-lang=csharp)
.gif?cs-save-lang=1&cs-lang=csharp)
.gif?cs-save-lang=1&cs-lang=csharp)
.gif?cs-save-lang=1&cs-lang=csharp)
.gif?cs-save-lang=1&cs-lang=csharp)