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

Between attribute More...

Inheritance diagram for Utilities.Validation.BetweenAttribute:

Public Member Functions

 BetweenAttribute (object Min, object Max, string ErrorMessage="")
 Constructor More...
 
override string FormatErrorMessage (string name)
 Formats the error message More...
 
IEnumerable< ModelClientValidationRule > GetClientValidationRules (ModelMetadata metadata, ControllerContext context)
 Gets the client side validation rules More...
 

Protected Member Functions

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

Properties

object Max [get]
 Max value to compare to More...
 
object Min [get]
 Min value to compare to More...
 

Detailed Description

Between attribute

Definition at line 37 of file Between.cs.

Constructor & Destructor Documentation

Utilities.Validation.BetweenAttribute.BetweenAttribute ( object  Min,
object  Max,
string  ErrorMessage = "" 
)

Constructor

Parameters
MaxMax value
MinMin value
ErrorMessageError message

Definition at line 45 of file Between.cs.

Member Function Documentation

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

Formats the error message

Parameters
nameProperty name
Returns
The formatted string

Definition at line 67 of file Between.cs.

IEnumerable<ModelClientValidationRule> Utilities.Validation.BetweenAttribute.GetClientValidationRules ( ModelMetadata  metadata,
ControllerContext  context 
)

Gets the client side validation rules

Parameters
metadataModel meta data
contextController context
Returns
The list of client side validation rules

Definition at line 78 of file Between.cs.

override ValidationResult Utilities.Validation.BetweenAttribute.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 94 of file Between.cs.

Property Documentation

object Utilities.Validation.BetweenAttribute.Max
get

Max value to compare to

Definition at line 55 of file Between.cs.

object Utilities.Validation.BetweenAttribute.Min
get

Min value to compare to

Definition at line 60 of file Between.cs.


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