Packages

o

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
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 maximum total number of digits (including decimals)

    scale

    The maximum 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. val char: Mapping[Char]

    Constructs a simple mapping for a char field.

    Constructs a simple mapping for a char field.

    For example:

    Form("gender" -> char)
  11. def checked(msg: String): Mapping[Boolean]
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  13. 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

  14. 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)
  15. 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.

  16. 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)
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. 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.

  23. def indexedSeq[A](mapping: Mapping[A]): Mapping[IndexedSeq[A]]

    Defines a repeated mapping with the IndexedSeq semantic.

    Defines a repeated mapping with the IndexedSeq semantic.

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

    The mapping to make repeated.

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. 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.

  26. def localDate(pattern: String): Mapping[LocalDate]

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

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

    For example:

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

    the date pattern, as defined in java.time.format.DateTimeFormatter

  27. val localDate: Mapping[LocalDate]

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

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

    For example:

    Form("birthdate" -> localDate)
  28. def localDateTime(pattern: String): Mapping[LocalDateTime]

    Constructs a simple mapping for a date field (mapped as java.time.LocalDateTime type).

    Constructs a simple mapping for a date field (mapped as java.time.LocalDateTime type).

    For example:

    Form("dateTime" -> localDateTime("dd-MM-yyyy HH:mm:ss"))
    pattern

    the date pattern, as defined in java.time.format.DateTimeFormatter

  29. val localDateTime: Mapping[LocalDateTime]

    Constructs a simple mapping for a date field (mapped as java.time.LocalDateTime type).

    Constructs a simple mapping for a date field (mapped as java.time.LocalDateTime type).

    For example:

    Form("dateTime" -> localDateTime)
  30. def localTime(pattern: String): Mapping[LocalTime]

    Constructs a simple mapping for a date field (mapped as java.time.LocalTime type).

    Constructs a simple mapping for a date field (mapped as java.time.LocalTime type).

    For example:

    Form("time" -> localTime("HH:mm:ss"))
    pattern

    the date pattern, as defined in java.time.format.DateTimeFormatter

  31. val localTime: Mapping[LocalTime]

    Constructs a simple mapping for a date field (mapped as java.time.LocalTime type).

    Constructs a simple mapping for a date field (mapped as java.time.LocalTime type).

    For example:

    Form("time" -> localTime)
  32. 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

  33. 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)
  34. 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]
  35. 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]
  36. 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]
  37. 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]
  38. 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]
  39. 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]
  40. 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]
  41. 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]
  42. 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]
  43. 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]
  44. 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]
  45. 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]
  46. 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]
  47. 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]
  48. 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]
  49. 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]
  50. 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]
  51. 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]
  52. 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]
  53. 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]
  54. def mapping[R, A1, A2](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]))(apply: (A1, A2) ⇒ R)(unapply: (R) ⇒ Option[(A1, A2)]): Mapping[R]
  55. 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)
    )
    R

    the mapped type

    apply

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

    unapply

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

    returns

    a mapping for type R

  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. 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.

  58. 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 explicitly. But a nonEmptyText defines text field that must not be empty, even if present in the form.

    Example:

    Form("username" -> nonEmptyText)
  59. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  60. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  61. 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

  62. 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)
  63. 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

  64. 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.

  65. 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.

  66. 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.

  67. 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

  68. 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)
  69. 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

  70. def sqlDate(pattern: String): 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

  71. 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)
  72. def sqlTimestamp(pattern: String, timeZone: TimeZone = java.util.TimeZone.getDefault): Mapping[Timestamp]

    Constructs a simple mapping for a Timestamp field (mapped as java.sql.Timestamp type).

    Constructs a simple mapping for a Timestamp field (mapped as java.sql.Timestamp type).

    For example:

    Form("birthdate" -> sqlTimestamp("dd-MM-yyyy hh:mm:ss"))
    pattern

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

    timeZone

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

  73. val sqlTimestamp: Mapping[Timestamp]

    Constructs a simple mapping for a timestamp field (mapped as java.sql.Timestamp type).

    Constructs a simple mapping for a timestamp field (mapped as java.sql.Timestamp type).

    For example:

    Form("birthdate" -> sqlTimestamp)
  74. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  75. 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

  76. 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)
  77. def toString(): String
    Definition Classes
    AnyRef → Any
  78. 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)]
  79. 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)]
  80. 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)]
  81. 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)]
  82. 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)]
  83. 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)]
  84. 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)]
  85. 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)]
  86. 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)]
  87. 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)]
  88. 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)]
  89. 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)]
  90. 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)]
  91. 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)]
  92. 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)]
  93. 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)]
  94. 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)]
  95. 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)]
  96. 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)]
  97. def tuple[A1, A2, A3](a1: (String, Mapping[A1]), a2: (String, Mapping[A2]), a3: (String, Mapping[A3])): Mapping[(A1, A2, A3)]
  98. 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)

  99. 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)
  100. def vector[A](mapping: Mapping[A]): Mapping[Vector[A]]

    Defines a repeated mapping with the Vector semantic.

    Defines a repeated mapping with the Vector semantic.

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

    The mapping to make repeated.

  101. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  103. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped