MinLengthAttributeAdapter Class

Definition

Provides an adapter for the MinLengthAttribute attribute.

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

Constructors

MinLengthAttributeAdapter(ModelMetadata, ControllerContext, MinLengthAttribute)

Initializes a new instance of the MinLenghtAttribute class.

Properties

Attribute

Gets the validation attribute from the model validator.

(Inherited from DataAnnotationsModelValidator<TAttribute>)
ControllerContext

Gets the controller context.

(Inherited from ModelValidator)
ErrorMessage

Gets the error message for the validation failure.

(Inherited from DataAnnotationsModelValidator)
IsRequired

Gets a value that indicates whether model validation is required.

(Inherited from DataAnnotationsModelValidator)
Metadata

Gets the metadata for the model validator.

(Inherited from ModelValidator)

Methods

GetClientValidationRules()

Gets a list of client validation rules for the minimum length check.

Validate(Object)

Returns a list of validation error messages for the model.

(Inherited from DataAnnotationsModelValidator)

Applies to