Packages

  • package root
    Definition Classes
    root
  • package data
    Definition Classes
    root
  • 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.

    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.

    Definition Classes
    data
  • object StrictApplicativeAlgebra
    Definition Classes
    validation
  • eitherAlg
  • eitherNecAlg
  • optionAlg
  • validatedAlg

implicit object optionAlg extends StrictApplicativeAlgebra[Option, Unit]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. optionAlg
  2. StrictApplicativeAlgebra
  3. ApplicativeAlgebra
  4. Algebra
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Logic extends AnyRef

    Since we can fail and succeed, add logic support.

    Since we can fail and succeed, add logic support. This is really a Semigroup "combine" for a specific logic operation. Explicitly use or create an import for them as needed. We could defined an isValid type method in this trait but that's a bit of a code smell that we are using procedural logic and we can use these semigroups in other places and algorithms.

    Definition Classes
    Algebra
  2. type FF[T] = Option[T]

Value Members

  1. val A: ApplicativeError[Option, Unit]
    Definition Classes
    optionAlgApplicativeAlgebra
  2. def apply[I, O](implicit validator: Validator[Option, I, O]): Validator[Option, I, O]
    Definition Classes
    Algebra
  3. def fail[I]: Validator[Option, I, I]
    Definition Classes
    ApplicativeAlgebraAlgebra
  4. def failure[I](message: (I) => String): Validator[Option, I, I]

    Create an E potentially with the value and a message if E supports string messages, which it may not.

    Create an E potentially with the value and a message if E supports string messages, which it may not.

    Definition Classes
    optionAlgApplicativeAlgebra
  5. val logic: Logic { ... /* 2 definitions in type refinement */ }
    Definition Classes
    optionAlgAlgebra
  6. def pure[I, O](f: (I) => Option[O]): Validator[Option, I, O]
    Definition Classes
    Algebra
  7. def succeed[I]: Validator[Option, I, I]
    Definition Classes
    ApplicativeAlgebraAlgebra
  8. def test[T](id: String, failed: Validator[Option, T, T])(isValid: (T) => Boolean): Validator[Option, T, T]
    Definition Classes
    StrictApplicativeAlgebra