StringLengthAttributeAdapter StringLengthAttributeAdapter StringLengthAttributeAdapter Class

Definition

Provides an adapter for the StringLengthAttribute attribute.

public class StringLengthAttributeAdapter : System.Web.Mvc.DataAnnotationsModelValidator<System.ComponentModel.DataAnnotations.StringLengthAttribute>
type StringLengthAttributeAdapter = class
    inherit DataAnnotationsModelValidator<StringLengthAttribute>
Public Class StringLengthAttributeAdapter
Inherits DataAnnotationsModelValidator(Of StringLengthAttribute)
Inheritance

Constructors

StringLengthAttributeAdapter(ModelMetadata, ControllerContext, StringLengthAttribute) StringLengthAttributeAdapter(ModelMetadata, ControllerContext, StringLengthAttribute) StringLengthAttributeAdapter(ModelMetadata, ControllerContext, StringLengthAttribute)

Initializes a new instance of the StringLengthAttributeAdapter class.

Methods

GetClientValidationRules() GetClientValidationRules() GetClientValidationRules()

Gets a list of string-length client validation rules.

Validate(Object) Validate(Object) Validate(Object)

Returns a list of validation error messages for the model.

(Inherited from DataAnnotationsModelValidator)

Properties

Attribute Attribute Attribute

Gets the validation attribute from the model validator.

(Inherited from DataAnnotationsModelValidator<TAttribute>)
ControllerContext ControllerContext ControllerContext

Gets the controller context.

(Inherited from ModelValidator)
ErrorMessage ErrorMessage ErrorMessage

Gets the error message for the validation failure.

(Inherited from DataAnnotationsModelValidator)
IsRequired IsRequired IsRequired

Gets a value that indicates whether model validation is required.

(Inherited from DataAnnotationsModelValidator)
Metadata Metadata Metadata

Gets the metadata for the model validator.

(Inherited from ModelValidator)

Applies to