case class Constraint[-T](name: Option[String], args: Seq[Any])(f: (T) => ValidationResult) extends Product with Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- Constraint
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Constraint(name: Option[String], args: Seq[Any])(f: (T) => ValidationResult)
- name
the constraint name, to be displayed to final user
- args
the message arguments, to format the constraint name
- f
the validation function
Value Members
- def apply(t: T): ValidationResult
Run the constraint validation.
Run the constraint validation.
- t
the value to validate
- returns
the validation result
- val args: Seq[Any]
- val name: Option[String]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
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