ValidationModule
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[_].
Type members
Classlikes
Types
Value members
Concrete methods
Combines a
and b
using AND. Short-circuits if ValidationResult.strategy is
ValidationResult.Strategy.FailFast.
Combines a
and b
using AND. Short-circuits if ValidationResult.strategy is
ValidationResult.Strategy.FailFast.
Returns ValidationResult.valid if cond
is true else fails with provided error
Returns ValidationResult.valid if cond
is true else fails with provided error
Returns ValidationResult.valid if cond
is true else fails with provided error
Returns ValidationResult.valid if cond
is true else fails with provided error
Returns ValidationResult.valid if cond
is true else fails with provided error
Returns ValidationResult.valid if cond
is true else fails with provided error
Combines all validations using combine
function. This has minor optimistions that checks size to handle simple
cases.
Combines all validations using combine
function. This has minor optimistions that checks size to handle simple
cases.
Combines a
and b
using OR. Short-circuits if a
is valid
Combines a
and b
using OR. Short-circuits if a
is valid
Extensions
Inherited extensions
Adds new subrule to builder. Uses selector
to create Field, rules
are applied to that field
Adds new subrule to builder. Uses selector
to create Field, rules
are applied to that field
- Inherited from:
- PolicySyntax
Adds new subrule to builder. Same as subRule but for 2 subrules
Adds new subrule to builder. Same as subRule but for 2 subrules
- Inherited from:
- PolicySyntax
Applies check
to each collection element, any should succeed
Applies check
to each collection element, any should succeed
- Inherited from:
- IterableSyntax
Applies check
to each collection element, any should succeed
Applies check
to each collection element, any should succeed
- Inherited from:
- IterableSyntax
Applies check
to each collection element, each should succeed
Applies check
to each collection element, each should succeed
- Inherited from:
- IterableSyntax
Applies check
to each collection element, each should succeed
Applies check
to each collection element, each should succeed
- Inherited from:
- IterableSyntax
Checks that collection maximum size is max
Checks that collection maximum size is max
- Inherited from:
- IterableSyntax
Checks that collection minimum size is min
Checks that collection minimum size is min
- Inherited from:
- IterableSyntax
Checks that collection is not empty
Checks that collection is not empty
- Inherited from:
- IterableSyntax
Returns Field that has provided value and infers its FieldPath from field selects
Example:
scala> val request = Request(User("ann"))
val request: Request = Request(User(ann))
scala> val field = Field.from(request.user.name)
val field: jap.fields.Field[String] = request.user.name:ann
- Inherited from:
- FieldSyntax
Similar to Field.from but drops first selector path
Similar to Field.from but drops first selector path
Example:
scala> val request = Request(User("ann"))
val request: Request = Request(User(ann))
scala> val field = Field.sub(request.user.name)
val field: jap.fields.Field[String] = user.name:ann
- Inherited from:
- FieldSyntax
Returns subfield using selector
function to extract value and as path
Returns subfield using selector
function to extract value and as path
Example
scala> val request = Request(User("ann"))
scala> val field = Field.from(request)
val field: jap.fields.Field[Request] = request:Request(User(ann))
scala> field.sub(_.user.name)
val res1: jap.fields.Field[String] = request.user.name:ann
- Inherited from:
- FieldSyntax
Implicits
Implicits
Inherited implicits
- Inherited from:
- EffectValidationResultSyntax
- Inherited from:
- ValidationResultSyntax