DataAnnotationsModelValidator Class

Provides a model validator.

System.Object
  System.Web.Http.Validation.ModelValidator
    System.Web.Http.Validation.Validators.DataAnnotationsModelValidator

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

public class DataAnnotationsModelValidator : ModelValidator

The DataAnnotationsModelValidator type exposes the following members.

  NameDescription
Public methodDataAnnotationsModelValidatorInitializes a new instance of the DataAnnotationsModelValidator class.
Top

  NameDescription
Protected propertyAttributeGets or sets the validation attribute for the model validator.
Public propertyIsRequiredGets a value that indicates whether model validation is required. (Overrides ModelValidator.IsRequired.)
Protected propertyValidatorProvidersGets or sets an enumeration of validator providers. (Inherited from ModelValidator.)
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodValidateValidates the model and returns the validation errors if any. (Overrides ModelValidator.Validate(ModelMetadata, Object).)
Top

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