Table of Contents

Class MaxLengthAttributeAdapter

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

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 ModelMetadata

The model metadata.

context ControllerContext

The controller context.

attribute MaxLengthAttribute

The 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.