a constructor function that creates a instance of T
using field A
constraints associated with this mapping
a constructor function that creates a instance of T
using field A
Binds this field, i.
Binds this field, i.e. construct a concrete value from submitted data.
the submitted data
either a concrete value of type T
or a set of errors, if the binding failed
constraints associated with this mapping
constraints associated with this mapping
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).
Merges the result of multiple bindings.
Merges the result of multiple bindings.
bind()
Merges the result of two bindings.
Merges the result of two bindings.
bind()
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 the 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
Represents an object binding (ie. a binding for several fields).
This is used for objects with one field. Other versions exist, e.g.
ObjectMapping2
,ObjectMapping3
, etc.a constructor function that creates a instance of
T
using fieldA
constraints associated with this mapping