Table of Contents

Class StringLengthAttributeAdapter

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

Provides an adapter for the StringLengthAttribute attribute.

public class StringLengthAttributeAdapter : DataAnnotationsModelValidator<StringLengthAttribute>
Inheritance
StringLengthAttributeAdapter
Inherited Members

Constructors

StringLengthAttributeAdapter(ModelMetadata, ControllerContext, StringLengthAttribute)

Initializes a new instance of the StringLengthAttributeAdapter class.

public StringLengthAttributeAdapter(ModelMetadata metadata, ControllerContext context, StringLengthAttribute attribute)

Parameters

metadata ModelMetadata

The model metadata.

context ControllerContext

The controller context.

attribute StringLengthAttribute

The string-length attribute.

Methods

GetClientValidationRules()

Gets a list of string-length client validation rules.

public override IEnumerable<ModelClientValidationRule> GetClientValidationRules()

Returns

IEnumerable<ModelClientValidationRule>

A list of string-length client validation rules.