RuleOps
class AnyVal
trait Matchable
class Any
Value members
Concrete methods
Combines rule
and result of running f
on rule
using Rule.and. This is tricky syntax for usage with
for-comprehension yield should always return valid Validated if you want this to work correctly.
Combines rule
and result of running f
on rule
using Rule.and. This is tricky syntax for usage with
for-comprehension yield should always return valid Validated if you want this to work correctly.
scala> import jap.fields._
scala> import jap.fields.DefaultAccumulateVM._
scala> val intF = Field(4)
val intF: jap.fields.Field[Int] = root:4
scala> for {
| _ <- intF > 4
| _ <- intF < 4
| _ <- intF !== 4
| } yield V.valid
val res0:
jap.fields.Rule[[A] =>> A, jap.fields.typeclass.Validated.Accumulate,
jap.fields.ValidationError
] = Invalid(List(root -> should be greater than 4, root -> should be less than 4, root -> should not be equal to 4))