Craig's Utility Library  4.0 Beta
Utilities.Validation.MaxLengthAttribute Class Reference

Max length attribute More...

Inheritance diagram for Utilities.Validation.MaxLengthAttribute:

Public Member Functions

 MaxLengthAttribute (long Value, string ErrorMessage="")
 Constructor More...
 
override string FormatErrorMessage (string name)
 Formats the error message More...
 

Protected Member Functions

override ValidationResult IsValid (object value, ValidationContext validationContext)
 Determines if the property is valid More...
 

Properties

long Value [get]
 Value to compare to More...
 

Detailed Description

Max length attribute

Definition at line 33 of file MaxLength.cs.

Constructor & Destructor Documentation

Utilities.Validation.MaxLengthAttribute.MaxLengthAttribute ( long  Value,
string  ErrorMessage = "" 
)

Constructor

Parameters
ValueValue to check
ErrorMessageError message

Definition at line 40 of file MaxLength.cs.

Member Function Documentation

override string Utilities.Validation.MaxLengthAttribute.FormatErrorMessage ( string  name)

Formats the error message

Parameters
nameProperty name
Returns
The formatted string

Definition at line 56 of file MaxLength.cs.

override ValidationResult Utilities.Validation.MaxLengthAttribute.IsValid ( object  value,
ValidationContext  validationContext 
)
protected

Determines if the property is valid

Parameters
valueValue to check
validationContextValidation context
Returns
The validation result

Definition at line 68 of file MaxLength.cs.

Property Documentation

long Utilities.Validation.MaxLengthAttribute.Value
get

Value to compare to

Definition at line 49 of file MaxLength.cs.


The documentation for this class was generated from the following file: