the field key
the constraints associated with this field.
Changes the binder used to handle this field.
Changes the binder used to handle this field.
the new binder to use
the same mapping with a new binder
Binds this field, i.
Binds this field, i.e. constructs a concrete value from submitted data.
the submitted data
either a concrete value of type T
or a set of errors, if binding failed
the constraints associated with this field.
the constraints associated with this field.
The Format expected for this field, if it exists.
The Format expected for this field, if it exists.
the field key
the field key
Sub-mappings (these can be seen as sub-keys).
Sub-mappings (these can be seen as sub-keys).
Transform this Mapping[T] to a Mapping[B].
Transform this Mapping[T] to a Mapping[B].
The type of the new mapping.
Transform value of T to a value of B
Transform value of B to a value of T
Unbinds this field, i.
Unbinds this field, i.e. transforms a concrete value to plain data.
the value to unbind
either the plain data or a set of errors, if unbinding failed
Constructs a new Mapping based on this one, by adding new constraints.
Constructs a new Mapping based on this one, by adding new constraints.
For example:
import play.api.data._ import validation.Constraints._ Form("phonenumber" -> text.verifying(required) )
the new mapping
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
For example:
import play.api.data._ import validation.Constraints._ Form("phonenumber" -> text.verifying("Bad phone number", {_.grouped(2).size == 5}))
The error message used if the constraint fails
a function describing the constraint that returns false
on failure
the new mapping
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
Constructs a new Mapping based on this one, by adding a new ad-hoc constraint.
For example:
import play.api.data._ import validation.Constraints._ Form("phonenumber" -> text.verifying {_.grouped(2).size == 5})
a function describing the constraint that returns false
on failure
the new mapping
Constructs a new Mapping based on this one, adding a prefix to the key.
Constructs a new Mapping based on this one, adding a prefix to the key.
the prefix to add to the key
the same mapping, with only the key changed
A mapping for a single field.
the field key
the constraints associated with this field.