Adding Validation Rules Using Attributes
Validation definitions can be added to types and parameters at compile time through
the addition of attributes.
Included Attributes
-
Attributes that define comparison rules.
-
ComparePropertyRuleAttribute
Specifies that a ComparePropertyRule, that will compare against another property, should be applied to the property.
-
CompareByteRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareDateTimeRuleAttribute
Specifies that a CompareRule<T>, that will compare a System.DateTime, should be applied to the member.
-
CompareDecimalRuleAttribute
Specifies that a CompareRule<T>, that will check the range of a , should be applied to the member.
-
CompareDoubleRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareFloatRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareIntRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareLongRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareShortRuleAttribute
Specifies that a CompareRule<T>, that will compare a , should be applied to the member.
-
CompareStringRuleAttribute
Specifies that a CompareRule<T>, that will compare a string, should be applied to the member.
-
Attributes that define Conversion rules.
-
DateTimeConversionRuleAttribute
Specifies that a DateTimeConversionRule should be applied to the member.
-
EnumConversionRuleAttribute
Specifies that a EnumConversionRule should be applied to the member.
-
NumberConversionRuleAttribute
Specifies that a NumberConversionRule should be applied to the member.
-
Attributes that define length rules.
-
LengthCollectionRuleAttribute
Specifies that a should be applied to the member.
-
LengthStringRuleAttribute
Specifies that a should be applied to the member.
-
Attributes that define range rules.
-
RangeByteRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the member.
-
RangeDateTimeRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a System.DateTime, should be applied to the member.
-
RangeDecimalRuleAttribute
Specifies that a RangeRule<T>, that will check the range a , should be applied to the program element.
-
RangeDoubleRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the member.
-
RangeFloatRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the member.
-
RangeIntRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the program element.
-
RangeLongRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the member.
-
RangeShortRuleAttribute
Specifies that a RangeRule<T>, that will check the range of a , should be applied to the member.
-
RangeStringRuleAttribute
Specifies that a should be applied to the member.
-
Attributes that define required rules.
-
RequiredBoolRuleAttribute
Specifies that a should be applied to the member.
-
RequiredByteRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredDateTimeRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a System.DateTime, should be applied to the member.
-
RequiredDecimalRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredDoubleRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredEnumRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a System.Enum, should be applied to the member.
-
RequiredFloatRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredGuidRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a System.Guid, should be applied to the member.
-
RequiredIntRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredLongRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredObjectRuleAttribute
Specifies that a RequiredRule<T> should be applied to the member.
-
RequiredShortRuleAttribute
Specifies that a RequiredRule<T>, that will check the existance of a , should be applied to the member.
-
RequiredStringRuleAttribute
Specifies that a should be applied to the member.
-
Attributes that define other rules.
-
CustomRuleAttribute
Specifies that a should be applied to the member.
-
EnumerableDuplicateRuleAttribute
Specifies that a should be applied to the member.
-
RegexRuleAttribute
Specifies that a should be applied to the member.
-
ValidatableRuleAttribute
Specifies that a should be applied to the member.