Rule

com.eclipsesource.schema.internal.validation.Rule
See theRule companion trait
object Rule

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Rule.type

Members list

Value members

Concrete methods

def apply[I, O](m: ((JsPath, Seq[JsonValidationError]), I) => O): Rule[I, O]

Turn a A => Rule[B, C] into a Rule[(A, B), C]

Turn a A => Rule[B, C] into a Rule[(A, B), C]

 val passRule = From[JsValue] { __ =>
    ((__ \ "password").read(notEmpty) ~ (__ \ "verify").read(notEmpty))
      .tupled.compose(Rule.uncurry(Rules.equalTo[String]).repath(_ => (Path \ "verify")))
  }

Attributes

def fromMapping[I, O](f: (JsonValidationError, I) => O): Rule[I, O]
def keepAnd[E, EE >: E, A, B](a: Validated[E, A], o: Validated[E, B]): Validated[EE, B]