StringLengthAttributeAdapter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
-
StringLengthAttributeAdapter
Constructors
| StringLengthAttributeAdapter(ModelMetadata, ControllerContext, StringLengthAttribute) |
Initializes a new instance of the StringLengthAttributeAdapter 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 string-length client validation rules. |
| Validate(Object) |
Returns a list of validation error messages for the model. (Inherited from DataAnnotationsModelValidator) |