p

jap

fields

package fields

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait AccumulateLike[VR[_]] extends ValidationResult[VR]

    Base trait for ValidationResult's that accumulate error

  2. abstract class AccumulateVM[F[_], E] extends ValidationModule[F, Accumulate, E]

    Base trait for ValidationModule where ValidationResult is Accumulate

  3. trait CanFail[E] extends CanFailMessage[E] with CanFailCompare[E] with CanFailInvalid[E] with CanFailEmpty[E] with CanFailNonEmpty[E] with CanFailMinSize[E] with CanFailMaxSize[E] with CanFailOneOf[E]

    Aggregates all possible CanFail* typeclasses shorthand if you need all of them.

    Aggregates all possible CanFail* typeclasses shorthand if you need all of them. If are free to implemented only those you will use. Best practise will be to but implicit instance of this into companion object of your error.

  4. trait CanFailCompare[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  5. trait CanFailEmpty[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  6. trait CanFailInvalid[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  7. trait CanFailMaxSize[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  8. trait CanFailMessage[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  9. trait CanFailMinSize[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  10. trait CanFailNonEmpty[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  11. trait CanFailOneOf[E] extends AnyRef
    Annotations
    @implicitNotFound( ... )
  12. sealed trait CompareOperation extends AnyRef
  13. trait FailFastLike[VR[_]] extends ValidationResult[VR]

    Base trait for ValidationResult's that fail-fast

  14. abstract class FailFastVM[F[_], E] extends ValidationModule[F, FailFast, E]

    Base trait for ValidationModule where ValidationResult is FailFast

  15. final case class Field[+P](path: FieldPath, value: P) extends Product with Serializable

    jap.fields.Field is Heart of the library and contains field path and its value

    jap.fields.Field is Heart of the library and contains field path and its value

    path

    fields path

    value

    fields value

  16. trait FieldCompare[P, C] extends AnyRef
    Annotations
    @implicitNotFound( "Cannot compare ${P} with ${C}" )
  17. case class FieldError[E](path: FieldPath, error: E) extends Product with Serializable

    jap.fields.FieldError carries error with path where it occured.

    jap.fields.FieldError carries error with path where it occured. Using this can be useful when your error type does not support carrying path where it occured but you actually want to know it.

  18. final case class FieldPath(value: List[String]) extends AnyVal with Product with Serializable

    jap.fields.FieldPath contains path parts of the Field.

  19. trait ValidationEffect[F[_]] extends AnyRef

    jap.fieldsValidationEffect is a typeclass that provides ValidationModule with Monad/Defer capabilities.

  20. sealed trait ValidationError extends AnyRef

    Predefined Error type that carries error type and human-readable message

  21. abstract class ValidationModule[F[_], VR[_], E] extends GenericSyntax[F, VR, E] with FailSyntax[F, VR, E] with BooleanSyntax[F, VR, E] with EffectValidationResultSyntax[F, VR, E] with NumericSyntax[F, VR, E] with OptionSyntax[F, VR, E] with StringSyntax[F, VR, E] with IterableSyntax[F, VR, E] with MapSyntax[F, VR, E] with PolicySyntax[F, VR, E] with FieldSyntax with ValidationResultSyntax

    God object that provides all validation syntax for choosen Effect - F[_], ValidationResult - VR[_] and Error - E Requires user to provide implicit instances of ValidationEffect and ValidationResult typeclasses for choosen F[_] and VR[_].

    God object that provides all validation syntax for choosen Effect - F[_], ValidationResult - VR[_] and Error - E Requires user to provide implicit instances of ValidationEffect and ValidationResult typeclasses for choosen F[_] and VR[_].

    Annotations
    @implicitNotFound( ... )
  22. trait ValidationPolicy[P, F[_], VR[_], E] extends AnyRef

    Typeclass that defines how to validate given field

  23. case class ValidationPolicyBuilder[P, F[_], VR[_], E](rules: List[(Field[P]) ⇒ F[VR[E]]] = Nil)(implicit M: ValidationModule[F, VR, E]) extends Product with Serializable

    Builder class for jap.fields.ValidationPolicy.

    Builder class for jap.fields.ValidationPolicy. jap.fields.ValidationModule implicit should be in scope

  24. trait ValidationResult[VR[_]] extends AnyRef

    Typeclass that represents ValidationResult

Value Members

  1. object CanFail
  2. object CanFailCompare
  3. object CanFailEmpty
  4. object CanFailInvalid
  5. object CanFailMaxSize
  6. object CanFailMessage
  7. object CanFailMinSize
  8. object CanFailNonEmpty
  9. object CanFailOneOf
  10. object CompareOperation
  11. object DefaultAccumulateVM extends AccumulateVM[Id, FieldError[ValidationError]]

    Default ValidationModule where:

    Default ValidationModule where:

    • ValidationEffect is Id
    • ValidationResult is Accumulate
    • Error is FieldError[ValidationError]
  12. object DefaultFailFastVM extends FailFastVM[Id, FieldError[ValidationError]]

    Default ValidationModule where:

    Default ValidationModule where:

    • ValidationEffect is Id
    • ValidationResult is FailFast
    • Error is FieldError[ValidationError]
  13. object Field extends Serializable
  14. object FieldCompare
  15. object FieldMacro
  16. object FieldPath extends Serializable
  17. object ValidationEffect
  18. object ValidationError
  19. object ValidationErrors

    This corresponds to error field of ValidationError with given names

  20. object ValidationPolicy
  21. object ValidationResult

Ungrouped