Creates a new reusable ValidationRule based on the specified predicate.
Creates a new reusable ValidationRule based on the specified predicate.
text describing the rule being validated
returns true if the data is valid
a new reusable validation rule.
Implicit conversion that allows the same ValidationRule to be used for required and optional values.
Implicit conversion that allows the same ValidationRule to be used for required and optional values. If the optional value is non-empty, it gets validated (and validation may fail, producing an error), but if it is empty, it is always treated as valid.
the validation rule to adapt for optional values
a new validation rule that applies the specified rule to an optional value in case it is not empty
Allows the creation of reusable validation rules for Endpoints.