DefaultFailFastVM

Type members

Inherited classlikes

object MRule

Convenient accessors makes type inference better

Convenient accessors makes type inference better

Inherited from:
ValidationModule
Source:
ValidationModule.scala

Inherited types

type MPolicy[P] = Policy[P]

jap.fields.ValidationPolicy alias. Infers F, V, E

jap.fields.ValidationPolicy alias. Infers F, V, E

Inherited from:
ValidationModule
Source:
ValidationModule.scala
final type MRule = Rule[F, V, E]

jap.fields.Rule alias. F, V, E infered from jap.fields.ValidationModule Very useful for type inference when building custom validations

jap.fields.Rule alias. F, V, E infered from jap.fields.ValidationModule Very useful for type inference when building custom validations

Inherited from:
ValidationModule
Source:
ValidationModule.scala
type Policy[P] = ValidationPolicy[P, F, V, E]

jap.fields.ValidationPolicy alias. Infers F, V, E

jap.fields.ValidationPolicy alias. Infers F, V, E

Inherited from:
ValidationModule
Source:
ValidationModule.scala

Value members

Inherited methods

Unpacks rule from Option if None returns valid

Unpacks rule from Option if None returns valid

Inherited from:
ModuleOptionSyntax
Source:
OptionSyntax.scala

Inherited fields

Extensions

Inherited extensions

extension [P, F[_], V[_], E](builder: ValidationPolicyBuilder[P, F, V, E])
inline def subRule[S1, S2, S3](inline selector1: P => S1, inline selector2: P => S2, inline selector3: P => S3)(rules: (Field[S1], Field[S2], Field[S3]) => Rule[F, V, E]*): ValidationPolicyBuilder[P, F, V, E]

Adds new subrule to builder. Same as subRule but for 3 subrules

Adds new subrule to builder. Same as subRule but for 3 subrules

Inherited from:
PolicySyntax
Source:
PolicySyntax.scala
inline def subRule[S1, S2](inline selector1: P => S1, inline selector2: P => S2)(rules: (Field[S1], Field[S2]) => Rule[F, V, E]*): ValidationPolicyBuilder[P, F, V, E]

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
Source:
PolicySyntax.scala
inline def subRule[S](inline selector: P => S)(rules: Field[S] => Rule[F, V, E]*): ValidationPolicyBuilder[P, F, V, E]

Adds new subrule to builder. Uses selector to create jap.fields.Field, rules are applied to that field

Adds new subrule to builder. Uses selector to create jap.fields.Field, rules are applied to that field

Inherited from:
PolicySyntax
Source:
PolicySyntax.scala
extension [P](field: Field[P])
inline def sub[S](inline selector: P => S): Field[S]

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
Source:
FieldSyntax.scala
extension (field: Field.type)
inline def from[V](inline value: V): Field[V]

Returns jap.fields.Field that has provided value and infers its jap.fields.FieldPath from field selects

Returns jap.fields.Field that has provided value and infers its jap.fields.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
Source:
FieldSyntax.scala
inline def sub[V](inline value: V): Field[V]

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
Source:
FieldSyntax.scala

Implicits

Inherited implicits

implicit val F: Effect[Sync]
implicit val V: Validated[FailFast]
final implicit def toFieldOps[P](field: Field[P]): FieldOps[P, Sync, FailFast, ValidationError]
final implicit def toIterableFieldOps[P, I <: (Iterable)](field: Field[I[P]]): IterableFieldOps[P, I, Sync, FailFast, ValidationError]
final implicit def toMapFieldOps[K, P](field: Field[Map[K, P]]): MapFieldOps[K, P, Sync, FailFast, ValidationError]
Inherited from:
ModuleMapSyntax
Source:
MapSyntax.scala
final implicit def toRuleSequenceOps[F[_], V[_], E](rules: Iterable[Rule[F, V, E]]): RuleSequenceOps[F, V, E]
Inherited from:
RuleSyntax
Source:
RuleSyntax.scala
final implicit def toRuleValidationOps[F[_], V[_], E](rule: Rule[F, V, E]): RuleValidationOps[F, V, E]
Inherited from:
RuleSyntax
Source:
RuleSyntax.scala
final implicit def toValidatedIdOps[E](error: E): ValidatedIdOps[E]
final implicit def toValidatedOps[V[_], E](vr: V[E]): ValidatedOps[V, E]
final implicit def toValidatedSeqOps[V[_], E](iterable: Iterable[V[E]]): ValidatedSeqOps[V, E]