package validation
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.") }
- Alphabetic
- By Inheritance
- validation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type Constraint[T] = (T) ⇒ Validated[Seq[ValidationError], T]
- class ContravariantSyntax [M[_]] extends AnyRef
- class ContravariantSyntaxObs [M[_], A] extends AnyRef
-
trait
DateRules
extends AnyRef
This trait provides default Rule implementations, from String to various date types and format
- trait DateWrites extends AnyRef
-
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 forI
. - trait DefaultWrites extends DateWrites
- final case class FailProjection [+E, +A](v: Validated[Seq[E], A]) extends Product with Serializable
-
trait
Format
[IR, +IW, O] extends RuleLike[IR, O] with WriteLike[O, IW]
- Annotations
- @implicitNotFound( ... )
- case class Formatter [IR, IW](path: Path = Path(Nil)) extends Product with Serializable
- trait Formatting [IR, IW] extends AnyRef
- trait From [I] extends AnyRef
- class FunctorSyntax [M[_]] extends AnyRef
- class FunctorSyntaxObs [M[_], A] extends AnyRef
-
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.
- trait GenericWrites [O] extends AnyRef
- case class IdxPathNode (idx: Int) extends PathNode with Product with Serializable
- type Invalid[+E] = cats.data.Validated.Invalid[E]
- class InvariantSyntax [M[_]] extends AnyRef
- class InvariantSyntaxObs [M[_], A] extends AnyRef
- case class KeyPathNode (key: String) extends PathNode with Product with Serializable
-
type
Mapping[E, I, O] = (I) ⇒ Validated[Seq[E], O]
- Annotations
- @implicitNotFound( ... )
- trait NumericTypes2StringWrites extends AnyRef
- trait ParsingRules extends AnyRef
- class Path extends AnyRef
- sealed trait PathNode extends AnyRef
- case class Reader [I](path: Path = Path(Nil)) extends Product with Serializable
- trait Rule [I, O] extends RuleLike[I, O]
- trait RuleLike [I, O] extends AnyRef
- trait SyntaxCombine [M[_]] extends AnyRef
- trait To [I] extends AnyRef
- type VA[O] = cats.data.Validated[Seq[(Path, Seq[ValidationError])], O]
- trait VABackCompat [E, A] extends AnyRef
- type Valid[+A] = cats.data.Validated.Valid[A]
- type Validated[+E, +A] = cats.data.Validated[E, A]
-
case class
ValidationError
(messages: Seq[String], args: Any*) extends Product with Serializable
A validation error.
A validation error.
- args
the error message arguments
- trait Write [I, +O] extends WriteLike[I, O]
- trait WriteLike [I, +O] extends AnyRef
- case class Writer [I](path: Path = Path(Nil)) extends Product with Serializable
- case class ~ [A, B](_1: A, _2: B) extends Product with Serializable
Value Members
- val Invalid: cats.data.Validated.Invalid.type
- val Valid: cats.data.Validated.Valid.type
- val Validated: cats.data.Validated.type
- implicit def seqAlgebra[A]: Monoid[Seq[A]]
- implicit def validatedBackcompat[E, A](va: Validated[Seq[E], A]): VABackCompat[E, A]
- object Failure
-
object
Format
Default formatters.
- object Formatting
- object From
- object GenericRules extends GenericRules
- object MappingMacros
- object Path extends Path with Product with Serializable
- object Read
- object Rule
- object RuleLike
-
object
Success
Backcompat with 1.x.
Backcompat with 1.x. All the methods are deprecated
- object To
- object Validation
- object ValidationError extends Serializable
- object Write
- object WriteLike
- object \: