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

Not in range attribute More...

Inheritance diagram for Utilities.Validation.NotInRangeAttribute:

Public Member Functions

 NotInRangeAttribute (object Min, object Max, 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

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

Detailed Description

Not in range attribute

Definition at line 35 of file NotInRange.cs.

Constructor & Destructor Documentation

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

Constructor

Parameters
MaxMax value
MinMin value
ErrorMessageError message

Definition at line 43 of file NotInRange.cs.

Member Function Documentation

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

Formats the error message

Parameters
nameProperty name
Returns
The formatted string

Definition at line 65 of file NotInRange.cs.

override ValidationResult Utilities.Validation.NotInRangeAttribute.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 76 of file NotInRange.cs.

Property Documentation

IComparable Utilities.Validation.NotInRangeAttribute.Max
get

Max value to compare to

Definition at line 53 of file NotInRange.cs.

IComparable Utilities.Validation.NotInRangeAttribute.Min
get

Min value to compare to

Definition at line 58 of file NotInRange.cs.


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