DataAnnotationsModelValidatorProvider Class

 

Represents an implementation of ModelValidatorProvider which providers validators for attributes which derive from ValidationAttribute. It also provides a validator for types which implement IValidatableObject. To support client side validation, you can either register adapters through the static methods on this class, or by having your validation attributes implement T:System.Web.Http.Validation.IClientValidatable. The logic to support IClientValidatable is implemented in DataAnnotationsModelValidator.

Namespace:   System.Web.Http.Validation.Providers
Assembly:  System.Web.Http (in System.Web.Http.dll)

System::Object
  System.Web.Http.Validation::ModelValidatorProvider
    System.Web.Http.Validation.Providers::AssociatedValidatorProvider
      System.Web.Http.Validation.Providers::DataAnnotationsModelValidatorProvider

public ref class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider

NameDescription
System_CAPS_pubmethodDataAnnotationsModelValidatorProvider()

Initializes a new instance of the DataAnnotationsModelValidatorProvider class.

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^, IEnumerable<ModelValidatorProvider^>^)

Gets the validators for the model using the metadata and validator providers.(Inherited from AssociatedValidatorProvider.)

System_CAPS_protmethodGetValidators(ModelMetadata^, IEnumerable<ModelValidatorProvider^>^, IEnumerable<Attribute^>^)

Gets the validators for the model using the specified metadata, validator provider and attributes.(Overrides AssociatedValidatorProvider::GetValidators(ModelMetadata^, IEnumerable<ModelValidatorProvider^>^, IEnumerable<Attribute^>^).)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRegisterAdapter(Type^, Type^)

Registers an adapter to provide client-side validation.

System_CAPS_pubmethodRegisterAdapterFactory(Type^, DataAnnotationsModelValidationFactory^)

Registers an adapter factory for the validation provider.

System_CAPS_pubmethodRegisterDefaultAdapter(Type^)

Registers the default adapter.

System_CAPS_pubmethodRegisterDefaultAdapterFactory(DataAnnotationsModelValidationFactory^)

Registers the default adapter factory.

System_CAPS_pubmethodRegisterDefaultValidatableObjectAdapter(Type^)

Registers the default adapter type for objects which implement IValidatableObject. The adapter type must derive from ModelValidator and it must contain a public constructor which takes two parameters of types ModelMetadata and HttpActionContext.

System_CAPS_pubmethodRegisterDefaultValidatableObjectAdapterFactory(DataAnnotationsValidatableObjectAdapterFactory^)

Registers the default adapter factory for objects which implement IValidatableObject.

System_CAPS_pubmethodRegisterValidatableObjectAdapter(Type^, Type^)

Registers an adapter type for the given modelType, which must implement IValidatableObject. The adapter type must derive from ModelValidator and it must contain a public constructor which takes two parameters of types ModelMetadata and HttpActionContext.

System_CAPS_pubmethodRegisterValidatableObjectAdapterFactory(Type^, DataAnnotationsValidatableObjectAdapterFactory^)

Registers an adapter factory for the given modelType, which must implement IValidatableObject.

System_CAPS_pubmethodToString()

(Inherited from Object.)

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: