play.api.data

RepeatedMapping

case class RepeatedMapping[T](wrapped: Mapping[T], key: String = "", constraints: Seq[Constraint[List[T]]] = immutable.this.Nil) extends Mapping[List[T]] with Product with Serializable

A mapping for repeated elements.

wrapped

The wrapped mapping

Source
Form.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, Mapping[List[T]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RepeatedMapping
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Mapping
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RepeatedMapping(wrapped: Mapping[T], key: String = "", constraints: Seq[Constraint[List[T]]] = immutable.this.Nil)

    wrapped

    The wrapped mapping

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addPrefix(prefix: String): Option[String]

    Attributes
    protected
    Definition Classes
    Mapping
  7. def applyConstraints(t: List[T]): Either[Seq[FormError], List[T]]

    Attributes
    protected
    Definition Classes
    Mapping
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def bind(data: Map[String, String]): Either[Seq[FormError], List[T]]

    Binds this field, i.

    Binds this field, i.e. construct a concrete value from submitted data.

    data

    the submitted data

    returns

    either a concrete value of type List[T] or a set of errors, if the binding failed

    Definition Classes
    RepeatedMappingMapping
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def collectErrors(t: List[T]): Seq[FormError]

    Attributes
    protected
    Definition Classes
    Mapping
  12. val constraints: Seq[Constraint[List[T]]]

    The constraints associated with this field.

    The constraints associated with this field.

    Definition Classes
    RepeatedMappingMapping
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. val format: Option[(String, Seq[Any])]

    The Format expected for this field, if it exists.

    The Format expected for this field, if it exists.

    Definition Classes
    RepeatedMappingMapping
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. val key: String

    The field key.

    The field key.

    Definition Classes
    RepeatedMappingMapping
  19. val mappings: Seq[Mapping[_]]

    Sub-mappings (these can be seen as sub-keys).

    Sub-mappings (these can be seen as sub-keys).

    Definition Classes
    RepeatedMappingMapping
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def transform[B](f1: (List[T]) ⇒ B, f2: (B) ⇒ List[T]): Mapping[B]

    Transform this Mapping[T] to a Mapping[B].

    Transform this Mapping[T] to a Mapping[B].

    B

    The type of the new mapping.

    f1

    Transform value of T to a value of B

    f2

    Transform value of B to a value of T

    Definition Classes
    Mapping
  25. def unbind(value: List[T]): (Map[String, String], Seq[FormError])

    Unbinds this field, i.

    Unbinds this field, i.e. transforms a concrete value to plain data.

    value

    the value to unbind

    returns

    either the plain data or a set of errors, if the unbinding failed

    Definition Classes
    RepeatedMappingMapping
  26. def verifying(addConstraints: Constraint[List[T]]*): Mapping[List[T]]

    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) )
    returns

    the new mapping

    Definition Classes
    RepeatedMappingMapping
  27. def verifying(error: ⇒ String, constraint: (List[T]) ⇒ Boolean): Mapping[List[T]]

    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}))
    error

    The error message used if the constraint fails

    constraint

    a function describing the constraint that returns false on failure

    returns

    the new mapping

    Definition Classes
    Mapping
  28. def verifying(constraint: (List[T]) ⇒ Boolean): Mapping[List[T]]

    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})
    constraint

    a function describing the constraint that returns false on failure

    returns

    the new mapping

    Definition Classes
    Mapping
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withPrefix(prefix: String): Mapping[List[T]]

    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.

    prefix

    the prefix to add to the key

    returns

    the same mapping, with only the key changed

    Definition Classes
    RepeatedMappingMapping
  33. val wrapped: Mapping[T]

    The wrapped mapping

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Mapping[List[T]]

Inherited from AnyRef

Inherited from Any

Ungrouped