Constraint

play.api.data.validation.Constraint
See theConstraint companion object
case class Constraint[-T](name: Option[String], args: Seq[Any])(f: T => ValidationResult)

A form constraint.

Type parameters

T

type of values handled by this constraint

Value parameters

args

the message arguments, to format the constraint name

f

the validation function

name

the constraint name, to be displayed to final user

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(t: T): ValidationResult

Run the constraint validation.

Run the constraint validation.

Value parameters

t

the value to validate

Attributes

Returns

the validation result

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product