MinLengthAttribute Class
Specifies the minimum length of array or string data allowed in a property.
Inheritance Hierarchy
System.Object
System.Attribute
System.ComponentModel.DataAnnotations.ValidationAttribute
System.ComponentModel.DataAnnotations.MinLengthAttribute
Namespace: System.ComponentModel.DataAnnotations
Assembly: EntityFramework (in EntityFramework.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field Or AttributeTargets.Parameter, AllowMultiple := False)> _
Public Class MinLengthAttribute _
Inherits ValidationAttribute
'Usage
Dim instance As MinLengthAttribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false)]
public class MinLengthAttribute : ValidationAttribute
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field|AttributeTargets::Parameter, AllowMultiple = false)]
public ref class MinLengthAttribute : public ValidationAttribute
[<AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false)>]
type MinLengthAttribute =
class
inherit ValidationAttribute
end
public class MinLengthAttribute extends ValidationAttribute
The MinLengthAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MinLengthAttribute | Initializes a new instance of the MinLengthAttribute class. |
Top
Properties
Name | Description | |
---|---|---|
ErrorMessage | (Inherited from ValidationAttribute.) | |
ErrorMessageResourceName | (Inherited from ValidationAttribute.) | |
ErrorMessageResourceType | (Inherited from ValidationAttribute.) | |
ErrorMessageString | (Inherited from ValidationAttribute.) | |
Length | Gets the minimum allowable length of the array/string data. | |
RequiresValidationContext | (Inherited from ValidationAttribute.) | |
TypeId | (Inherited from Attribute.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Attribute.) | |
Finalize | (Inherited from Object.) | |
FormatErrorMessage | Applies formatting to a specified error message. (Overrides <see cref="M:System.ComponentModel.DataAnnotations.ValidationAttribute.FormatErrorMessage(System.String)" />) (Overrides ValidationAttribute.FormatErrorMessage(String).) | |
GetHashCode | (Inherited from Attribute.) | |
GetType | (Inherited from Object.) | |
GetValidationResult | (Inherited from ValidationAttribute.) | |
IsDefaultAttribute | (Inherited from Attribute.) | |
IsValid(Object) | Determines whether a specified object is valid. (Overrides <see cref="M:System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid(System.Object)" />) (Overrides ValidationAttribute.IsValid(Object).) | |
IsValid(Object, ValidationContext) | (Inherited from ValidationAttribute.) | |
Match | (Inherited from Attribute.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) | |
Validate(Object, String) | (Inherited from ValidationAttribute.) | |
Validate(Object, ValidationContext) | (Inherited from ValidationAttribute.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
_Attribute.GetIDsOfNames | (Inherited from Attribute.) | |
_Attribute.GetTypeInfo | (Inherited from Attribute.) | |
_Attribute.GetTypeInfoCount | (Inherited from Attribute.) | |
_Attribute.Invoke | (Inherited from Attribute.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
System.ComponentModel.DataAnnotations Namespace