Creates a new named constraint from a validation function.
Creates a new named constraint from a validation function.
the constraint name
the constraint arguments, used to format the constraint name
the validation function
a constraint
Creates a new anonymous constraint from a validation function.
Creates a new anonymous constraint from a validation function.
the validation function
a constraint
This object provides helpers for creating
Constraint
values.For example: