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
metadata
ModelMetadataThe metadata for the model.
context
ControllerContextThe controller context for the model.
attribute
TAttributeThe 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.