FieldOps

fields.lens.syntax.FieldOps
final class FieldOps[P, S, F[_], V[_], E](lens: FieldLens[P, S]) extends AnyVal

Attributes

Source
GenericSyntax.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def !==[C](compared: C)(implicit R: RuleOps[F, V, E], O: Ordering[S], FW: FailWithCompare[E, S], C: CompareShow[S, C], G: GetValue[P, S, C]): (P, F, V) => E

Alias for notEqualTo

Alias for notEqualTo

Attributes

Source
GenericSyntax.scala
def ===[C](compared: C)(implicit R: RuleOps[F, V, E], O: Ordering[S], FW: FailWithCompare[E, S], C: CompareShow[S, C], G: GetValue[P, S, C]): (P, F, V) => E

Alias for equalTo

Alias for equalTo

Attributes

Source
GenericSyntax.scala
def all(f: (FieldLens[P, S]) => (P, F, V) => E*)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Combines all validations using AND

Combines all validations using AND

Attributes

Source
GenericSyntax.scala
def any(f: (FieldLens[P, S]) => (P, F, V) => E*)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Combines all validations using OR

Combines all validations using OR

Attributes

Source
GenericSyntax.scala
def assert(test: Assertion[S], error: S => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Like RuleK.ensure but for explicit error

Like RuleK.ensure but for explicit error

Attributes

Source
GenericSyntax.scala
def assertF(test: S => F[Boolean], error: S => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Like RuleK.ensureF but for explicit error

Like RuleK.ensureF but for explicit error

Attributes

Source
GenericSyntax.scala
def assertParent(test: Assertion2[P, S], error: S => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Attributes

Source
GenericSyntax.scala
def check(f: S => V[E])(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Returns Suspended Outcome of applying f to field

Returns Suspended Outcome of applying f to field

Attributes

Source
GenericSyntax.scala
def checkF(f: S => RuleK[F, V, E])(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Returns Defered Outcome of applying f to field

Returns Defered Outcome of applying f to field

Attributes

Source
GenericSyntax.scala
def ensure(test: Assertion[S], error: S => V[E])(implicit R: RuleOps[F, V, E]): (P, F, V) => E

See RuleK.ensure

See RuleK.ensure

Attributes

Source
GenericSyntax.scala
def ensureF(test: S => F[Boolean], error: S => V[E])(implicit R: RuleOps[F, V, E]): (P, F, V) => E

See RuleK.ensureF

See RuleK.ensureF

Attributes

Source
GenericSyntax.scala
def equalTo[C](compared: C)(implicit R: RuleOps[F, V, E], O: Ordering[S], FW: FailWithCompare[E, S], C: CompareShow[S, C], G: GetValue[P, S, C]): (P, F, V) => E

Validates that fields.Field#value is equal to compared

Validates that fields.Field#value is equal to compared

Attributes

Source
GenericSyntax.scala
def in(seq: Seq[S])(implicit R: RuleOps[F, V, E], FW: FailWithOneOf[E, P]): (P, F, V) => E

Validates that fields.Field#value is contained by seq

Validates that fields.Field#value is contained by seq

Attributes

Source
GenericSyntax.scala
def notEqualTo[C](compared: C)(implicit R: RuleOps[F, V, E], O: Ordering[S], FW: FailWithCompare[E, S], C: CompareShow[S, C], G: GetValue[P, S, C]): (P, F, V) => E

Validates that fields.Field#value is not equal to compared

Validates that fields.Field#value is not equal to compared

Attributes

Source
GenericSyntax.scala
def unless(test: => Boolean)(f: (FieldLens[P, S]) => (P, F, V) => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Runs validation only if false

Runs validation only if false

Attributes

Source
GenericSyntax.scala
def validate(implicit policy: (S, F, V) => E, R: RuleOps[F, V, E], PP: PrependPath[E]): (P, F, V) => E

Validates fields.Field using implicit PolicyK

Validates fields.Field using implicit PolicyK

Attributes

Source
GenericSyntax.scala
def validateEither(p: P)(implicit R: RuleOps[F, V, E], P: (P, F, V) => E, E: HasErrors[V]): F[Either[List[E], P]]

Validates fields.Field using implicit PolicyK

Validates fields.Field using implicit PolicyK

Attributes

Source
GenericSyntax.scala
def when(test: => Boolean)(f: (FieldLens[P, S]) => (P, F, V) => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

Runs validation only if true

Runs validation only if true

Attributes

Source
GenericSyntax.scala
def when(test: Assertion[S])(rule: (FieldLens[P, S]) => (P, F, V) => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

See RuleK.when

See RuleK.when

Attributes

Source
GenericSyntax.scala
def whenF(test: S => F[Boolean])(rule: (FieldLens[P, S]) => (P, F, V) => E)(implicit R: RuleOps[F, V, E]): (P, F, V) => E

See RuleK.whenF

See RuleK.whenF

Attributes

Source
GenericSyntax.scala
def whenType[SS <: S](rule: (FieldLens[P, SS]) => (P, F, V) => E)(implicit R: RuleOps[F, V, E], CT: ClassTag[SS]): (P, F, V) => E

Runs rule for subtype PP else is valid

Runs rule for subtype PP else is valid

Attributes

Source
GenericSyntax.scala