play.api.data

Forms

object Forms

Contains data manipulation helpers (typically HTTP form handling)

import play.api.data._
import play.api.data.Forms._

val taskForm = Form(
  of(Task.apply _, Task.unapply _)(
    "name" -> text(minLength = 3),
    "dueDate" -> date("yyyy-MM-dd"),
    "done" -> boolean
  )
)
Source
Forms.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Forms
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def bigDecimal(precision: Int, scale: Int): Mapping[BigDecimal]

    Constructs a mapping for a BigDecimal field.

    Constructs a mapping for a BigDecimal field.

    For example:

    Form("montant" -> bigDecimal(10, 2))
    precision

    The maximun total number of digits (including decimals)

    scale

    The maximun number of decimals

  6. val bigDecimal: Mapping[BigDecimal]

    Constructs a simple mapping for a BigDecimal field.

    Constructs a simple mapping for a BigDecimal field.

    For example:

    Form("montant" -> bigDecimal)
  7. val boolean: Mapping[Boolean]

    Constructs a simple mapping for a Boolean field, such as a check-box.

    Constructs a simple mapping for a Boolean field, such as a check-box.

    For example:

    Form("accepted" -> boolean)
  8. def byteNumber(min: Byte = Byte.MinValue, max: Byte = Byte.MaxValue, strict: Boolean = false): Mapping[Byte]

    Constructs a simple mapping for a numeric field (using a Short type behind).

    Constructs a simple mapping for a numeric field (using a Short type behind).

    For example:

    Form("size" -> byteNumber(min=0, max=100))
    min

    minimum value

    max

    maximum value

    strict

    should it be a strict comparison

  9. val byteNumber: Mapping[Byte]

    Constructs a simple mapping for a numeric field (using a Byte type behind).

    Constructs a simple mapping for a numeric field (using a Byte type behind).

    For example:

    Form("size" -> byteNumber)
  10. def checked(msg: String): Mapping[Boolean]

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def date(pattern: String, timeZone: TimeZone = java.util.TimeZone.getDefault): Mapping[Date]

    Constructs a simple mapping for a date field.

    Constructs a simple mapping for a date field.

    For example:

    Form("birthdate" -> date("dd-MM-yyyy"))
    pattern

    the date pattern, as defined in java.text.SimpleDateFormat

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  13. val date: Mapping[Date]

    Constructs a simple mapping for a date field.

    Constructs a simple mapping for a date field.

    For example:

    Form("birthdate" -> date)
  14. def default[A](mapping: Mapping[A], value: A): Mapping[A]

    Defines an default mapping, if the parameter is not present, provide a default value.

    Defines an default mapping, if the parameter is not present, provide a default value.

    Form(
    "name" -> default(text, "The default text")
    )
    mapping

    The mapping to make optional.

    value

    The default value when mapping and the field is not present.

  15. val email: Mapping[String]

    Constructs a simple mapping for an e-mail field.

    Constructs a simple mapping for an e-mail field.

    See also

    http://www.w3.org/TR/html5/forms.html#e-mail-state-(type=email)

    For example:

    Form("email" -> email)
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def ignored[A](value: A): Mapping[A]

    Define a fixed value in a mapping.

    Define a fixed value in a mapping. This mapping will not participate to the binding.

    value

    As we ignore this parameter in binding/unbinding we have to provide a default value.

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def jodaDate(pattern: String, timeZone: DateTimeZone = ...): Mapping[DateTime]

    Constructs a simple mapping for a date field (mapped as org.joda.time.DateTime type).

    Constructs a simple mapping for a date field (mapped as org.joda.time.DateTime type).

    For example:

    Form("birthdate" -> jodaDate("dd-MM-yyyy"))
    pattern

    the date pattern, as defined in org.joda.time.format.DateTimeFormat

    timeZone

    the org.joda.time.DateTimeZone to use for parsing and formatting

  24. val jodaDate: Mapping[DateTime]

    Constructs a simple mapping for a date field (mapped as org.joda.time.DateTime type).

    Constructs a simple mapping for a date field (mapped as org.joda.time.DateTime type).

    For example:

    Form("birthdate" -> jodaDate)
  25. def jodaLocalDate(pattern: String): Mapping[LocalDate]

    Constructs a simple mapping for a date field (mapped as org.joda.time.LocalDate type).

    Constructs a simple mapping for a date field (mapped as org.joda.time.LocalDate type).

    For example:

    Form("birthdate" -> jodaLocalDate("dd-MM-yyyy"))
    pattern

    the date pattern, as defined in org.joda.time.format.DateTimeFormat

  26. val jodaLocalDate: Mapping[LocalDate]

    Constructs a simple mapping for a date field (mapped as org.joda.time.LocalDatetype).

    Constructs a simple mapping for a date field (mapped as org.joda.time.LocalDatetype).

    For example:

    Form("birthdate" -> jodaLocalDate)
  27. def list[A](mapping: Mapping[A]): Mapping[List[A]]

    Defines a repeated mapping.

    Defines a repeated mapping.

    Form(
    "name" -> list(text)
    )
    mapping

    The mapping to make repeated.

  28. def longNumber(min: Long = Long.MinValue, max: Long = Long.MaxValue, strict: Boolean = false): Mapping[Long]

    Constructs a simple mapping for a numeric field (using a Long type behind).

    Constructs a simple mapping for a numeric field (using a Long type behind).

    For example:

    Form("size" -> longNumber(min=0, max=100))
    min

    minimum value

    max

    maximum value

    strict

    should it be a strict comparison

  29. val longNumber: Mapping[Long]

    Constructs a simple mapping for a numeric field (using a Long type behind).

    Constructs a simple mapping for a numeric field (using a Long type behind).

    For example:

    Form("size" -> longNumber)
  30. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20]), a21: (String, Mapping[A21]), a22: (String, Mapping[A22]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)]): Mapping[R]

  31. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20]), a21: (String, Mapping[A21]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)]): Mapping[R]

  32. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)]): Mapping[R]

  33. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)]): Mapping[R]

  34. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)]): Mapping[R]

  35. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)]): Mapping[R]

  36. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)]): Mapping[R]

  37. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)]): Mapping[R]

  38. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)]): Mapping[R]

  39. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)]): Mapping[R]

  40. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)]): Mapping[R]

  41. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)]): Mapping[R]

  42. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)]): Mapping[R]

  43. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8, A9](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8, A9) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8, A9)]): Mapping[R]

  44. def mapping[R, A1, A2, A3, A4, A5, A6, A7, A8](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]))(apply: (A1, A2, A3, A4, A5, A6, A7, A8) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7, A8)]): Mapping[R]

  45. def mapping[R, A1, A2, A3, A4, A5, A6, A7](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]))(apply: (A1, A2, A3, A4, A5, A6, A7) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6, A7)]): Mapping[R]

  46. def mapping[R, A1, A2, A3, A4, A5, A6](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]))(apply: (A1, A2, A3, A4, A5, A6) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5, A6)]): Mapping[R]

  47. def mapping[R, A1, A2, A3, A4, A5](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]))(apply: (A1, A2, A3, A4, A5) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4, A5)]): Mapping[R]

  48. def mapping[R, A1, A2, A3, A4](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]))(apply: (A1, A2, A3, A4) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3, A4)]): Mapping[R]

  49. def mapping[R, A1, A2, A3](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]))(apply: (A1, A2, A3) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2, A3)]): Mapping[R]

  50. def mapping[R, A1, A2](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]))(apply: (A1, A2) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2)]): Mapping[R]

  51. def mapping[R, A1](a1: (String, Mapping[A1]))(apply: (A1) ⇒ R)(unapply: (R) ⇒ Option[A1]): Mapping[R]

    Creates a Mapping of type T.

    Creates a Mapping of type T.

    For example:

    Form(
    mapping(
      "email" -> of[String]
    )(User.apply, User.unapply)
    )
    apply

    A function able to create a value of T from a value of A1 (If T is case class you can use its own apply function)

    unapply

    A function able to create A1 from a value of T (If T is a case class you can use its own unapply function)

    returns

    a mapping for type T

  52. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  53. def nonEmptyText(minLength: Int = 0, maxLength: Int = Int.MaxValue): Mapping[String]

    Constructs a simple mapping for required text field.

    Constructs a simple mapping for required text field.

    Example:

    Form("username" -> nonEmptyText(minLength=3))
    minLength

    Text min length.

    maxLength

    Text max length.

  54. val nonEmptyText: Mapping[String]

    Constructs a simple mapping for required text field.

    Constructs a simple mapping for required text field.

    Note that all field are always required to be present in the form unless there are marked as optional explicitely. But a nonEmptyText defines text field that must not be empty, even if present in the form.

    Example:

    Form("username" -> nonEmptyText)
  55. final def notify(): Unit

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

    Definition Classes
    AnyRef
  57. def number(min: Int = Int.MinValue, max: Int = Int.MaxValue, strict: Boolean = false): Mapping[Int]

    Constructs a simple mapping for a numeric field.

    Constructs a simple mapping for a numeric field.

    For example:

    Form("size" -> number(min=0, max=100))
    min

    minimum value

    max

    maximum value

    strict

    should it be a strict comparison

  58. val number: Mapping[Int]

    Constructs a simple mapping for a numeric field.

    Constructs a simple mapping for a numeric field.

    For example:

    Form("size" -> number)
  59. def of[T](implicit binder: Formatter[T]): FieldMapping[T]

    Creates a Mapping of type T.

    Creates a Mapping of type T.

    For example:

    Form("email" -> of[String])
    T

    the mapping type

    returns

    a mapping for a simple field

  60. def optional[A](mapping: Mapping[A]): Mapping[Option[A]]

    Defines an optional mapping.

    Defines an optional mapping.

    Form(
    "name" -> optional(text)
    )
    mapping

    The mapping to make optional.

  61. def seq[A](mapping: Mapping[A]): Mapping[Seq[A]]

    Defines a repeated mapping.

    Defines a repeated mapping.

    Form(
    "name" -> seq(text)
    )
    mapping

    The mapping to make repeated.

  62. def set[A](mapping: Mapping[A]): Mapping[Set[A]]

    Defines a repeated mapping with the Set semantic.

    Defines a repeated mapping with the Set semantic.

    Form(
    "name" -> set(text)
    )
    mapping

    The mapping to make repeated.

  63. def shortNumber(min: Short = Short.MinValue, max: Short = Short.MaxValue, strict: Boolean = false): Mapping[Short]

    Constructs a simple mapping for a numeric field (using a Short type behind).

    Constructs a simple mapping for a numeric field (using a Short type behind).

    For example:

    Form("size" -> shortNumber(min=0, max=100))
    min

    minimum value

    max

    maximum value

    strict

    should it be a strict comparison

  64. val shortNumber: Mapping[Short]

    Constructs a simple mapping for a numeric field (using a Short type behind).

    Constructs a simple mapping for a numeric field (using a Short type behind).

    For example:

    Form("size" -> shortNumber)
  65. def single[A1](a1: (String, Mapping[A1])): Mapping[A1]

    Creates a Mapping for a single value.

    Creates a Mapping for a single value.

    For example:

    Form(
    single(
      "email" -> email
    )
    )
    returns

    a mapping for a type A1

  66. def sqlDate(pattern: String, timeZone: TimeZone = java.util.TimeZone.getDefault): Mapping[Date]

    Constructs a simple mapping for a date field (mapped as sql.Date type).

    Constructs a simple mapping for a date field (mapped as sql.Date type).

    For example:

    Form("birthdate" -> sqlDate("dd-MM-yyyy"))
    pattern

    the date pattern, as defined in java.text.SimpleDateFormat

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  67. val sqlDate: Mapping[Date]

    Constructs a simple mapping for a date field (mapped as sql.Date type).

    Constructs a simple mapping for a date field (mapped as sql.Date type).

    For example:

    Form("birthdate" -> sqlDate)
  68. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  69. def text(minLength: Int = 0, maxLength: Int = Int.MaxValue): Mapping[String]

    Constructs a simple mapping for a text field.

    Constructs a simple mapping for a text field.

    For example:

    Form("username" -> text(minLength=3))
    minLength

    minimum text length

    maxLength

    maximum text length

  70. val text: Mapping[String]

    Constructs a simple mapping for a text field.

    Constructs a simple mapping for a text field.

    For example:

    Form("username" -> text)
  71. def toString(): String

    Definition Classes
    AnyRef → Any
  72. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20]), a21: (String, Mapping[A21]), a22: (String, Mapping[A22])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22)]

  73. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20]), a21: (String, Mapping[A21])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)]

  74. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19]), a20: (String, Mapping[A20])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)]

  75. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18]), a19: (String, Mapping[A19])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)]

  76. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17]), a18: (String, Mapping[A18])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)]

  77. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16]), a17: (String, Mapping[A17])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)]

  78. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15]), a16: (String, Mapping[A16])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)]

  79. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14]), a15: (String, Mapping[A15])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)]

  80. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13]), a14: (String, Mapping[A14])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)]

  81. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12]), a13: (String, Mapping[A13])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)]

  82. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11]), a12: (String, Mapping[A12])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)]

  83. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10]), a11: (String, Mapping[A11])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)]

  84. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9]), a10: (String, Mapping[A10])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)]

  85. def tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8]), a9: (String, Mapping[A9])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8, A9)]

  86. def tuple[A1, A2, A3, A4, A5, A6, A7, A8](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7]), a8: (String, Mapping[A8])): Mapping[(A1, A2, A3, A4, A5, A6, A7, A8)]

  87. def tuple[A1, A2, A3, A4, A5, A6, A7](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6]), a7: (String, Mapping[A7])): Mapping[(A1, A2, A3, A4, A5, A6, A7)]

  88. def tuple[A1, A2, A3, A4, A5, A6](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5]), a6: (String, Mapping[A6])): Mapping[(A1, A2, A3, A4, A5, A6)]

  89. def tuple[A1, A2, A3, A4, A5](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4]), a5: (String, Mapping[A5])): Mapping[(A1, A2, A3, A4, A5)]

  90. def tuple[A1, A2, A3, A4](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3]), a4: (String, Mapping[A4])): Mapping[(A1, A2, A3, A4)]

  91. def tuple[A1, A2, A3](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3])): Mapping[(A1, A2, A3)]

  92. def tuple[A1, A2](a1: (String, Mapping[A1]), a2: (String, Mapping[A2])): Mapping[(A1, A2)]

    Creates a Mapping of tuple (A,B).

    Creates a Mapping of tuple (A,B).

    For example:

    Form(
    tuple(
      "email" -> email,
      "password" -> nonEmptyText
    )
    )
    returns

    a mapping for a tuple (A,B)

  93. val uuid: Mapping[UUID]

    Constructs a simple mapping for a UUID field.

    Constructs a simple mapping for a UUID field.

    For example:

    Form("id" -> uuid)
  94. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped