package fields
- Alphabetic
- Public
- All
Type Members
-
trait
AccumulateLike[VR[_]] extends ValidationResult[VR]
Base trait for ValidationResult's that accumulate error
-
abstract
class
AccumulateVM[F[_], E] extends ValidationModule[F, Accumulate, E]
Base trait for ValidationModule where ValidationResult is Accumulate
-
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.
-
trait
CanFailCompare[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailEmpty[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailInvalid[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailMaxSize[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailMessage[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailMinSize[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailNonEmpty[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
-
trait
CanFailOneOf[E] extends AnyRef
- Annotations
- @implicitNotFound( ... )
- sealed trait CompareOperation extends AnyRef
-
trait
FailFastLike[VR[_]] extends ValidationResult[VR]
Base trait for ValidationResult's that fail-fast
-
abstract
class
FailFastVM[F[_], E] extends ValidationModule[F, FailFast, E]
Base trait for ValidationModule where ValidationResult is FailFast
-
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
-
trait
FieldCompare[P, C] extends AnyRef
- Annotations
- @implicitNotFound( "Cannot compare ${P} with ${C}" )
-
case class
FieldError[E](path: FieldPath, error: E) extends Product with Serializable
jap.fields.FieldError carries
errorwithpathwhere it occured.jap.fields.FieldError carries
errorwithpathwhere it occured. Using this can be useful when yourerrortype does not support carryingpathwhere it occured but you actually want to know it. -
final
case class
FieldPath(value: List[String]) extends AnyVal with Product with Serializable
jap.fields.FieldPath contains path parts of the Field.
-
trait
ValidationEffect[F[_]] extends AnyRef
jap.fieldsValidationEffect is a typeclass that provides ValidationModule with Monad/Defer capabilities.
-
sealed
trait
ValidationError extends AnyRef
Predefined Error type that carries
errortype and human-readable message -
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( ... )
-
trait
ValidationPolicy[P, F[_], VR[_], E] extends AnyRef
Typeclass that defines how to validate given field
-
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
-
trait
ValidationResult[VR[_]] extends AnyRef
Typeclass that represents ValidationResult
Value Members
- object CanFail
- object CanFailCompare
- object CanFailEmpty
- object CanFailInvalid
- object CanFailMaxSize
- object CanFailMessage
- object CanFailMinSize
- object CanFailNonEmpty
- object CanFailOneOf
- object CompareOperation
-
object
DefaultAccumulateVM extends AccumulateVM[Id, FieldError[ValidationError]]
Default ValidationModule where:
Default ValidationModule where:
- ValidationEffect is Id
- ValidationResult is Accumulate
- Error is FieldError[ValidationError]
-
object
DefaultFailFastVM extends FailFastVM[Id, FieldError[ValidationError]]
Default ValidationModule where:
Default ValidationModule where:
- ValidationEffect is Id
- ValidationResult is FailFast
- Error is FieldError[ValidationError]
- object Field extends Serializable
- object FieldCompare
- object FieldMacro
- object FieldPath extends Serializable
- object ValidationEffect
- object ValidationError
-
object
ValidationErrors
This corresponds to
errorfield of ValidationError with given names - object ValidationPolicy
- object ValidationResult