DataAnnotationsModelValidatorProvider Class
Implements the default validation provider for MVC.
Inheritance Hierarchy
System.Object
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)
Syntax
'Declaration
Public Class DataAnnotationsModelValidatorProvider _
Inherits AssociatedValidatorProvider
public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider
public ref class DataAnnotationsModelValidatorProvider : public AssociatedValidatorProvider
The DataAnnotationsModelValidatorProvider type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataAnnotationsModelValidatorProvider | Initializes a new instance of the DataAnnotationsModelValidatorProvider class. |
Top
Properties
Name | Description | |
---|---|---|
AddImplicitRequiredAttributeForValueTypes | Gets or sets a value that indicates whether non-nullable value types are required. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (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 | Creates a shallow copy of the current Object. (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. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
A validation provider provides validators for the data model.
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.