Class MinLengthAttributeAdapter
Provides an adapter for the MinLengthAttribute attribute.
public class MinLengthAttributeAdapter : DataAnnotationsModelValidator<MinLengthAttribute>
- Inheritance
-
MinLengthAttributeAdapter
- Inherited Members
Constructors
MinLengthAttributeAdapter(ModelMetadata, ControllerContext, MinLengthAttribute)
Initializes a new instance of the MinLenghtAttribute class.
public MinLengthAttributeAdapter(ModelMetadata metadata, ControllerContext context, MinLengthAttribute attribute)
Parameters
metadata
ModelMetadataThe model metadata.
context
ControllerContextThe controller context.
attribute
MinLengthAttributeThe minimum length attribute.
Methods
GetClientValidationRules()
Gets a list of client validation rules for the minimum length check.
public override IEnumerable<ModelClientValidationRule> GetClientValidationRules()
Returns
- IEnumerable<ModelClientValidationRule>
A list of client validation rules for a check.