-
Notifications
You must be signed in to change notification settings - Fork 2
ReferencePropertyValidator
crmckenzie edited this page Mar 30, 2012
·
4 revisions
Used to validate reference properties. This validator is most easily used through the Fluent Properties API.
Sample
yield return Properties<Employee> .For(e => e.Address) .Required() .Cascade("Save") ;
- Cascade() - Will execute Validator.Validate and aggregate the results where T is the type of the value of the property.
- Cascade<T> - will execute Validator.Validate and aggregate the results where T is a supertype of the value of the property.
- DoNotCascade() - Will not call Validator.Validate and aggregate the results for the property value.
- Required() - Indicates that the property value cannot be null.
- NotRequired() - Indicates that the property can be null. If null, Cascade() will not be called.
- Message() - Specifies the message to be returned if the validation fails.
- Severity() - Specifies the severity of the ValidationResult if the validator fails.
- Type() - Specifies the type of the ValidationResult if the validator fails.