Class DataAnnotationsModelValidator<TAttribute>
Provides a model validator for a specified validation type.
public class DataAnnotationsModelValidator<TAttribute> : DataAnnotationsModelValidator where TAttribute : ValidationAttribute
Type Parameters
TAttribute
- Inheritance
-
DataAnnotationsModelValidator<TAttribute>
- Derived
- Inherited Members
Constructors
DataAnnotationsModelValidator(ModelMetadata, ControllerContext, TAttribute)
Initializes a new instance of the DataAnnotationsModelValidator class.
public DataAnnotationsModelValidator(ModelMetadata metadata, ControllerContext context, TAttribute attribute)
Parameters
metadataModelMetadataThe metadata for the model.
contextControllerContextThe controller context for the model.
attributeTAttributeThe validation attribute for the model.
Properties
Attribute
Gets the validation attribute from the model validator.
protected TAttribute Attribute { get; }
Property Value
- TAttribute
The validation attribute from the model validator.