DataAnnotationsModelValidatorProvider Class

Implements the default validation provider for ASP.NET MVC.

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

Public Class DataAnnotationsModelValidatorProvider _
	Inherits AssociatedValidatorProvider
Dim instance As DataAnnotationsModelValidatorProvider

The DataAnnotationsModelValidatorProvider type exposes the following members.

Public methodDataAnnotationsModelValidatorProviderInitializes a new instance of the DataAnnotationsModelValidatorProvider class.

Public propertyStatic memberAddImplicitRequiredAttributeForValueTypesGets or sets a value that indicates whether non-nullable value types are required.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodGetTypeDescriptorGets a type descriptor for the specified type. (Inherited from AssociatedValidatorProvider.)
Public methodGetValidators(ModelMetadata, ControllerContext)Gets the validators for the model using the metadata and controller context. (Inherited from AssociatedValidatorProvider.)
Protected methodGetValidators(ModelMetadata, ControllerContext, IEnumerable(Of Attribute))Gets a list of validators. (Overrides AssociatedValidatorProvider.GetValidators(ModelMetadata, ControllerContext, IEnumerable(Of Attribute)).)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberRegisterAdapterRegisters an adapter to provide client-side validation.
Public methodStatic memberRegisterAdapterFactoryRegisters an adapter factory for the validation provider.
Public methodStatic memberRegisterDefaultAdapterRegisters the default adapter.
Public methodStatic memberRegisterDefaultAdapterFactoryRegisters the default adapter factory.
Public methodStatic memberRegisterDefaultValidatableObjectAdapterRegisters an adapter to provide default object validation.
Public methodStatic memberRegisterDefaultValidatableObjectAdapterFactoryRegisters an adapter factory for the default object validation provider.
Public methodStatic memberRegisterValidatableObjectAdapterRegisters an adapter to provide object validation.
Public methodStatic memberRegisterValidatableObjectAdapterFactoryRegisters an adapter factory for the object validation provider.
Public methodToString (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.

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