case class Constraint[-T](name: Option[String], args: Seq[Any])(f: (T) => ValidationResult) extends Product with Serializable

A form constraint.

T

type of values handled by this constraint

name

the constraint name, to be displayed to final user

args

the message arguments, to format the constraint name

f

the validation function

Source
Validation.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Constraint
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. def apply(t: T): ValidationResult

    Run the constraint validation.

    Run the constraint validation.

    t

    the value to validate

    returns

    the validation result

  2. val args: Seq[Any]
  3. val name: Option[String]
  4. def productElementNames: Iterator[String]
    Definition Classes
    Product