Packages

p

data

validation

package validation

A set of cats related data types for validation specific to our needs that included data driven validation while still supporting multple styles such as DSL or non-DSL.

Overview

By using cats you can compose on the Result or the Validator depending on your needs. Some additonal methods for defining a Validator are provided using the Tester classes--smart constructors for Validator.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. validation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Algebra[F[_]] extends AnyRef

    A validation concept involves a function that evaluates a value and the ability to create a success or failure based on an input type wrapped in F.

    A validation concept involves a function that evaluates a value and the ability to create a success or failure based on an input type wrapped in F. F must be able to express the concept of success or failure. Note that at this level, F could be a product type or sum type (coproduct). Usually they are sum types.

    Should we consider message gathering to be a "logging" activity and use a writer monad?

  2. trait ApplicativeAlgebra[F[_], E] extends Algebra[F]

    Encode valid/invalid via an ApplicativeError and failure via an E.

  3. trait ConversionOps[F[_], E] extends AnyRef
  4. case class Error(message: String, path: Path = Path.empty) extends Product with Serializable

    Useful instance for the formulation below.

    Useful instance for the formulation below. You can define your own.

  5. type Errors = Type[Error]

    Convenience type, as if Validated[Errors, T]

  6. trait LogicOps[F[_], E] extends AnyRef
  7. trait NumberOps[F[_], E] extends AnyRef
  8. trait ObjectOps[F[_], E] extends AnyRef
  9. trait OptionOps[F[_], E] extends AnyRef
  10. type Path = Seq[String]

    Need to expand to include indexed positions, etc.

  11. type Result[T] = Validated[NonEmptyChain[Error], T]

    Allow multiple errors if invalid, Validated has rich combinators including sequencing.

  12. trait StrictApplicativeAlgebra[F[_], E] extends ApplicativeAlgebra[F, E]

    A boolean test for validity is a strict test

  13. trait StringOps[F[_], E] extends AnyRef
  14. trait ValidationAlgebra[F[_], E] extends StringOps[F, E] with ObjectOps[F, E] with LogicOps[F, E] with NumberOps[F, E] with OptionOps[F, E] with ConversionOps[F, E]
  15. trait ValidationAlgebraInstances extends AnyRef
  16. type Validator[F[_], A, B] = Kleisli[F, A, B]

    Enable cats combinators including sequencing

Value Members

  1. case object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  2. object Path
  3. object StrictApplicativeAlgebra
  4. object ValidationAlgebra extends ValidationAlgebraInstances

Inherited from AnyRef

Inherited from Any

Ungrouped