Package

play.api.data

mapping

Permalink

package mapping

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.")
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. mapping
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type Constraint[T] = (T) ⇒ Validation[ValidationError, T]

    Permalink
  2. trait DateRules extends AnyRef

    Permalink

    This trait provides default Rule implementations, from String to various date types and format

  3. trait DateWrites extends AnyRef

    Permalink
  4. trait DefaultRules[I] extends GenericRules with DateRules

    Permalink

    DefaultRules provides basic rules implementations for inputs of type I Extends this trait if your implementing a new set of Rules for I.

  5. trait DefaultWrites extends DateWrites

    Permalink
  6. final case class FailProjection[+E, +A](v: Validation[E, A]) extends Product with Serializable

    Permalink
  7. class Failure[+E, +A] extends Validation[E, A]

    Permalink
  8. trait Format[IR, IW, O] extends RuleLike[IR, O] with WriteLike[O, IW]

    Permalink
    Annotations
    @implicitNotFound( ... )
  9. case class Formatter[IR, IW](path: Path = Path(Nil)) extends Product with Serializable

    Permalink
  10. trait Formatting[IR, IW] extends AnyRef

    Permalink
  11. trait From[I] extends AnyRef

    Permalink
  12. trait GenericRules extends AnyRef

    Permalink

    GenericRules provides basic constraints, utility methods on Rules, and completely generic Rules.

    GenericRules provides basic constraints, utility methods on Rules, and completely generic Rules. Extends this trait if your implementing a new set of Rules.

  13. trait GenericWrites[O] extends AnyRef

    Permalink
  14. case class IdxPathNode(idx: Int) extends PathNode with Product with Serializable

    Permalink
  15. case class KeyPathNode(key: String) extends PathNode with Product with Serializable

    Permalink
  16. type Mapping[E, I, O] = (I) ⇒ Validation[E, O]

    Permalink
    Annotations
    @implicitNotFound( ... )
  17. trait NumericTypes2StringWrites extends AnyRef

    Permalink
  18. trait ParsingRules extends AnyRef

    Permalink
  19. class Path extends AnyRef

    Permalink
  20. sealed trait PathNode extends AnyRef

    Permalink
  21. case class Reader[I](path: Path = Path(Nil)) extends Product with Serializable

    Permalink
  22. trait Rule[I, O] extends RuleLike[I, O]

    Permalink

    A Rule is

  23. trait RuleLike[I, O] extends AnyRef

    Permalink
  24. class Success[+E, +A] extends Validation[E, A]

    Permalink
  25. final case class SuccessProjection[+E, +A](v: Validation[E, A]) extends Product with Serializable

    Permalink
  26. trait To[I] extends AnyRef

    Permalink
  27. type VA[O] = Validation[(Path, Seq[ValidationError]), O]

    Permalink
  28. sealed trait Validation[+E, +A] extends AnyRef

    Permalink

    Validation[E, A] is the result of a validation, where E is the type of each error, and A is the type of the result if the validation is successful The only two possible implementations are Success[E, A](value: A), or Failure[E, A](errors: Seq[E])

  29. type ValidationError = validation.ValidationError

    Permalink
  30. trait Write[I, +O] extends WriteLike[I, O]

    Permalink
  31. trait WriteLike[I, +O] extends AnyRef

    Permalink
  32. case class Writer[I](path: Path = Path(Nil)) extends Product with Serializable

    Permalink

Value Members

  1. object Failure

    Permalink
  2. object Format

    Permalink

    Default formatters.

  3. object Formatting

    Permalink
  4. object From

    Permalink
  5. object GenericRules extends GenericRules

    Permalink
  6. object MappingMacros

    Permalink
  7. object Path extends Path with Product with Serializable

    Permalink
  8. object Rule

    Permalink
  9. object RuleLike

    Permalink
  10. object Success

    Permalink
  11. object To

    Permalink
  12. object Validation

    Permalink
  13. def ValidationError(message: String, args: Any*): ValidationError

    Permalink
  14. object Write

    Permalink
  15. object WriteLike

    Permalink
  16. object \:

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped