DataAnnotationsModelValidatorProvider Class
Implements the default validation provider for ASP.NET MVC.
System.Object
System.Web.Mvc.ModelValidatorProvider
System.Web.Mvc.AssociatedValidatorProvider
System.Web.Mvc.DataAnnotationsModelValidatorProvider
System.Web.Mvc.ModelValidatorProvider
System.Web.Mvc.AssociatedValidatorProvider
System.Web.Mvc.DataAnnotationsModelValidatorProvider
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The DataAnnotationsModelValidatorProvider type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DataAnnotationsModelValidatorProvider | Initializes a new instance of the DataAnnotationsModelValidatorProvider class. |
| Name | Description | |
|---|---|---|
![]() ![]() | AddImplicitRequiredAttributeForValueTypes | Gets or sets a value that indicates whether non-nullable value types are required. |
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | GetTypeDescriptor | Gets a type descriptor for the specified type. (Inherited from AssociatedValidatorProvider.) |
![]() | GetValidators(ModelMetadata, ControllerContext) | Gets the validators for the model using the metadata and controller context. (Inherited from AssociatedValidatorProvider.) |
![]() | GetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>) | Gets a list of validators. (Overrides AssociatedValidatorProvider.GetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>).) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() ![]() | RegisterAdapter | Registers an adapter to provide client-side validation. |
![]() ![]() | RegisterAdapterFactory | Registers an adapter factory for the validation provider. |
![]() ![]() | RegisterDefaultAdapter | Registers the default adapter. |
![]() ![]() | RegisterDefaultAdapterFactory | Registers the default adapter factory. |
![]() ![]() | RegisterDefaultValidatableObjectAdapter | Registers an adapter to provide default object validation. |
![]() ![]() | RegisterDefaultValidatableObjectAdapterFactory | Registers an adapter factory for the default object validation provider. |
![]() ![]() | RegisterValidatableObjectAdapter | Registers an adapter to provide object validation. |
![]() ![]() | RegisterValidatableObjectAdapterFactory | Registers an adapter factory for the object validation provider. |
![]() | ToString | (Inherited from Object.) |
A validation provider provides validators for the data model. This class is an implementation of the AssociatedValidatorProvider class. It provides validators for attributes which derive from ValidationAttribute and it provides a validator for types which implement IValidatableObject. To support client side validation, register adapters through the static methods of this class, or create validation attributes that implement IClientValidatable. The logic to support IClientValidatable is implemented in the DataAnnotationsModelValidator class.
Show:
