object Constraint extends Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- Constraint
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def apply[T](name: String, args: Any*)(f: (T) => ValidationResult): Constraint[T]
Creates a new named constraint from a validation function.
Creates a new named constraint from a validation function.
- name
the constraint name
- args
the constraint arguments, used to format the constraint name
- f
the validation function
- returns
a constraint
- def apply[T](f: (T) => ValidationResult): Constraint[T]
Creates a new anonymous constraint from a validation function.
Creates a new anonymous constraint from a validation function.
- f
the validation function
- returns
a constraint
This object provides helpers for creating
Constraint
values.For example: