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