play.api.data

mapping

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
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

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

  2. trait DateRules extends AnyRef

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

  3. trait DateWrites extends AnyRef

  4. trait DefaultRules[I] extends GenericRules with DateRules

    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

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

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

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

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

  10. trait Formatting[IR, IW] extends AnyRef

  11. trait From[I] extends AnyRef

  12. trait GenericRules extends AnyRef

    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

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

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

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

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

  18. trait ParsingRules extends AnyRef

  19. class Path extends AnyRef

  20. sealed trait PathNode extends AnyRef

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

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

    A Rule is

  23. trait RuleLike[I, O] extends AnyRef

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

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

  26. trait To[I] extends AnyRef

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

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

    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

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

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

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

Value Members

  1. object Failure

  2. object Format

    Default formatters.

  3. object Formatting

  4. object From

  5. object GenericRules extends GenericRules

  6. object MappingMacros

  7. object Path extends Path with Product with Serializable

  8. object Rule

  9. object RuleLike

  10. object Success

  11. object To

  12. object Validation

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

  14. object Write

  15. object WriteLike

  16. object \:

Inherited from AnyRef

Inherited from Any

Ungrouped