Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Used to validate reference properties. This validator is most easily used through the Fluent Properties API.
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.
- If() - specifies a condition under which the validator will be executed.
- 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.