Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package data

    Contains data manipulation helpers (typically HTTP form handling)

    Contains data manipulation helpers (typically HTTP form handling)

    import play.api.data._
    import play.api.data.Forms._
    
    val taskForm = Form(
      tuple(
        "name" -> text(minLength = 3),
        "dueDate" -> date("yyyy-MM-dd"),
        "done" -> boolean
      )
    )
    Definition Classes
    api
  • package validation

    Contains the validation API used by Form.

    Contains the validation API used by Form.

    For example, to define a custom constraint:

    val negative = Constraint[Int] {
      case i if i < 0 => Valid
      case _ => Invalid("Must be a negative number.")
    }
    Definition Classes
    data
  • Constraint
  • Constraints
  • Invalid
  • ParameterValidator
  • Valid
  • ValidationError
  • ValidationResult

trait Constraints extends AnyRef

Defines a set of built-in constraints.

Source
Validation.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Constraints
  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 clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def emailAddress: Constraint[String]

    Defines an ‘emailAddress’ constraint for String values which will validate email addresses.

    Defines an ‘emailAddress’ constraint for String values which will validate email addresses.

    name[constraint.email] error[error.email]

  7. def emailAddress(errorMessage: String = "error.email"): Constraint[String]

    Defines an ‘emailAddress’ constraint for String values which will validate email addresses.

    Defines an ‘emailAddress’ constraint for String values which will validate email addresses.

    name[constraint.email] error[error.email]

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def max[T](maxValue: T, strict: Boolean = false, errorMessage: String = "error.max", strictErrorMessage: String = "error.max.strict")(implicit ordering: Ordering[T]): Constraint[T]

    Defines a maximum value for Ordered values, by default the value must be less than or equal to the constraint parameter

    Defines a maximum value for Ordered values, by default the value must be less than or equal to the constraint parameter

    name[constraint.max(maxValue)] error[error.max(maxValue)] or [error.max.strict(maxValue)]

  15. def maxLength(length: Int, errorMessage: String = "error.maxLength"): Constraint[String]

    Defines a maximum length constraint for String values, i.e.

    Defines a maximum length constraint for String values, i.e. the string’s length must be less than or equal to the constraint parameter

    name[constraint.maxLength(length)] error[error.maxLength(length)]

  16. def min[T](minValue: T, strict: Boolean = false, errorMessage: String = "error.min", strictErrorMessage: String = "error.min.strict")(implicit ordering: Ordering[T]): Constraint[T]

    Defines a minimum value for Ordered values, by default the value must be greater than or equal to the constraint parameter

    Defines a minimum value for Ordered values, by default the value must be greater than or equal to the constraint parameter

    name[constraint.min(minValue)] error[error.min(minValue)] or [error.min.strict(minValue)]

  17. def minLength(length: Int, errorMessage: String = "error.minLength"): Constraint[String]

    Defines a minimum length constraint for String values, i.e.

    Defines a minimum length constraint for String values, i.e. the string’s length must be greater than or equal to the constraint parameter

    name[constraint.minLength(length)] error[error.minLength(length)]

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def nonEmpty: Constraint[String]

    Defines a ‘required’ constraint for String values, i.e.

    Defines a ‘required’ constraint for String values, i.e. one in which empty strings are invalid.

    name[constraint.required] error[error.required]

  20. def nonEmpty(errorMessage: String = "error.required"): Constraint[String]

    Defines a ‘required’ constraint for String values, i.e.

    Defines a ‘required’ constraint for String values, i.e. one in which empty strings are invalid.

    name[constraint.required] error[error.required]

  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def pattern(regex: => Regex, name: String = "constraint.pattern", error: String = "error.pattern"): Constraint[String]

    Defines a regular expression constraint for String values, i.e.

    Defines a regular expression constraint for String values, i.e. the string must match the regular expression pattern

    name[constraint.pattern(regex)] or defined by the name parameter. error[error.pattern(regex)] or defined by the error parameter.

  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped