Object

play.api.data

Forms

Related Doc: package data

Permalink

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

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

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

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

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

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink
  12. def clone(): AnyRef

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

    Permalink

    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]

    Permalink

    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]

    Permalink

    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]

    Permalink

    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

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

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

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

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

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

    Permalink

    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. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def list[A](mapping: Mapping[A]): Mapping[List[A]]

    Permalink

    Defines a repeated mapping.

    Defines a repeated mapping.

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

    The mapping to make repeated.

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

    Permalink

    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

  26. val localDate: Mapping[LocalDate]

    Permalink

    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)
  27. def localDateTime(pattern: String): Mapping[LocalDateTime]

    Permalink

    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

  28. val localDateTime: Mapping[LocalDateTime]

    Permalink

    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)
  29. def localTime(pattern: String): Mapping[LocalTime]

    Permalink

    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

  30. val localTime: Mapping[LocalTime]

    Permalink

    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)
  31. def longNumber(min: Long = Long.MinValue, max: Long = Long.MaxValue, strict: Boolean = false): Mapping[Long]

    Permalink

    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

  32. val longNumber: Mapping[Long]

    Permalink

    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)
  33. 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]

    Permalink
  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](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]

    Permalink
  35. 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]

    Permalink
  36. 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]

    Permalink
  37. 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]

    Permalink
  38. 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]

    Permalink
  39. 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]

    Permalink
  40. 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]

    Permalink
  41. 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]

    Permalink
  42. 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]

    Permalink
  43. 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]

    Permalink
  44. 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]

    Permalink
  45. 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]

    Permalink
  46. 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]

    Permalink
  47. 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]

    Permalink
  48. 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]

    Permalink
  49. 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]

    Permalink
  50. 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]

    Permalink
  51. 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]

    Permalink
  52. 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]

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

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

    Permalink

    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

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

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

    Permalink

    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.

  57. val nonEmptyText: Mapping[String]

    Permalink

    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)
  58. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  59. final def notifyAll(): Unit

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

    Permalink

    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

  61. val number: Mapping[Int]

    Permalink

    Constructs a simple mapping for a numeric field.

    Constructs a simple mapping for a numeric field.

    For example:

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

    Permalink

    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

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

    Permalink

    Defines an optional mapping.

    Defines an optional mapping.

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

    The mapping to make optional.

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

    Permalink

    Defines a repeated mapping.

    Defines a repeated mapping.

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

    The mapping to make repeated.

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

    Permalink

    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.

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

    Permalink

    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

  67. val shortNumber: Mapping[Short]

    Permalink

    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)
  68. def single[A1](a1: (String, Mapping[A1])): Mapping[A1]

    Permalink

    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

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

    Permalink

    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

  70. val sqlDate: Mapping[Date]

    Permalink

    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)
  71. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink

    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

  73. val text: Mapping[String]

    Permalink

    Constructs a simple mapping for a text field.

    Constructs a simple mapping for a text field.

    For example:

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

    Permalink
    Definition Classes
    AnyRef → Any
  75. 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)]

    Permalink
  76. 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)]

    Permalink
  77. 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)]

    Permalink
  78. 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)]

    Permalink
  79. 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)]

    Permalink
  80. 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)]

    Permalink
  81. 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)]

    Permalink
  82. 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)]

    Permalink
  83. 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)]

    Permalink
  84. 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)]

    Permalink
  85. 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)]

    Permalink
  86. 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)]

    Permalink
  87. 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)]

    Permalink
  88. 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)]

    Permalink
  89. 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)]

    Permalink
  90. 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)]

    Permalink
  91. 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)]

    Permalink
  92. 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)]

    Permalink
  93. 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)]

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

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

    Permalink

    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)

  96. val uuid: Mapping[UUID]

    Permalink

    Constructs a simple mapping for a UUID field.

    Constructs a simple mapping for a UUID field.

    For example:

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped