DataAnnotationsModelValidator Class
Provides a model validator.
Inheritance Hierarchy
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)
Syntax
'Declaration
Public Class DataAnnotationsModelValidator _
Inherits ModelValidator
'Usage
Dim instance As DataAnnotationsModelValidator
public class DataAnnotationsModelValidator : ModelValidator
public ref class DataAnnotationsModelValidator : public ModelValidator
type DataAnnotationsModelValidator =
class
inherit ModelValidator
end
public class DataAnnotationsModelValidator extends ModelValidator
The DataAnnotationsModelValidator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataAnnotationsModelValidator | Initializes a new instance of the DataAnnotationsModelValidator class. |
Top
Properties
Name | Description | |
---|---|---|
Attribute | Gets or sets the validation attribute for the model validator. | |
IsRequired | Gets a value that indicates whether model validation is required. (Overrides ModelValidator.IsRequired.) | |
ValidatorProviders | Gets or sets an enumeration of validator providers. (Inherited from ModelValidator.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) | |
Validate | Validates the model and returns the validation errors if any. (Overrides ModelValidator.Validate(ModelMetadata, Object).) |
Top
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.