Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataAnnotationsModelValidatorProvider Class

 

Implements the default validation provider for ASP.NET MVC.

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

System.Object
  System.Web.Mvc.ModelValidatorProvider
    System.Web.Mvc.AssociatedValidatorProvider
      System.Web.Mvc.DataAnnotationsModelValidatorProvider

public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider

NameDescription
System_CAPS_pubmethodDataAnnotationsModelValidatorProvider()

Initializes a new instance of the DataAnnotationsModelValidatorProvider class.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticAddImplicitRequiredAttributeForValueTypes

Gets or sets a value that indicates whether non-nullable value types are required.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodGetTypeDescriptor(Type)

Gets a type descriptor for the specified type.(Inherited from AssociatedValidatorProvider.)

System_CAPS_pubmethodGetValidators(ModelMetadata, ControllerContext)

Gets the validators for the model using the metadata and controller context.(Inherited from AssociatedValidatorProvider.)

System_CAPS_protmethodGetValidators(ModelMetadata, ControllerContext, IEnumerable<Attribute>)
System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticRegisterAdapter(Type, Type)

Registers an adapter to provide client-side validation.

System_CAPS_pubmethodSystem_CAPS_staticRegisterAdapterFactory(Type, DataAnnotationsModelValidationFactory)

Registers an adapter factory for the validation provider.

System_CAPS_pubmethodSystem_CAPS_staticRegisterDefaultAdapter(Type)

Registers the default adapter.

System_CAPS_pubmethodSystem_CAPS_staticRegisterDefaultAdapterFactory(DataAnnotationsModelValidationFactory)

Registers the default adapter factory.

System_CAPS_pubmethodSystem_CAPS_staticRegisterDefaultValidatableObjectAdapter(Type)

Registers an adapter to provide default object validation.

System_CAPS_pubmethodSystem_CAPS_staticRegisterDefaultValidatableObjectAdapterFactory(DataAnnotationsValidatableObjectAdapterFactory)

Registers an adapter factory for the default object validation provider.

System_CAPS_pubmethodSystem_CAPS_staticRegisterValidatableObjectAdapter(Type, Type)

Registers an adapter to provide object validation.

System_CAPS_pubmethodSystem_CAPS_staticRegisterValidatableObjectAdapterFactory(Type, DataAnnotationsValidatableObjectAdapterFactory)

Registers an adapter factory for the object validation provider.

System_CAPS_pubmethodToString()

(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.

Return to top
Show:
© 2015 Microsoft