A form constraint.
A form constraint.
type of values handled by this constraint
the constraint name, to be displayed to final user
the message arguments, to format the constraint name
the validation function
Defines a set of built-in constraints.
Validation was a failure.
Validation was a failure.
the resulting errors
A validation error.
A validation error.
the error message, if more then one message is passed it will use the last one
the error message arguments
A validation result.
This object provides helpers for creating Constraint
values.
This object provides helpers for creating Constraint
values.
For example:
val negative = Constraint[Int] { case i if i < 0 => Valid case _ => Invalid("Must be a negative number.") }
Defines a set of built-in constraints.
This object provides helper methods to construct Invalid
values.
Validation was a success.
Contains the validation API used by
Form
.For example, to define a custom constraint: