ValidateOps

final implicit class ValidateOps[T](val thisValidate: T => Result)
class Object
trait Matchable
class Any

Value members

Concrete methods

def &(otherValidate: () => T): () => T

Conjuction. Compose this check with another check and expect them both to pass.

Conjuction. Compose this check with another check and expect them both to pass.

def *[U](otherValidate: () => U): () => (T, U)

Product. Compose this check with another check to construct tuple of checks.

Product. Compose this check with another check to construct tuple of checks.

def ?(otherValidate: () => T): () => T

Chain two constraints so that if first is true than the second is evaluated.

Chain two constraints so that if first is true than the second is evaluated.

def ?!(otherValidate: () => T): () => T

Chain two constraints so that if first is false than the second is evaluated.

Chain two constraints so that if first is false than the second is evaluated.

def @:(errorPrefix: String): () => T

Adds prefix to the error messages.

Adds prefix to the error messages.

def @@(errorPrefix: String): () => T

Adds prefix to the error messages.

Adds prefix to the error messages.

def and(otherValidate: () => T): () => T

Conjuction. Compose this check with another check and expect them both to pass.

Conjuction. Compose this check with another check and expect them both to pass.

def andWhenValid(otherValidate: () => T): () => T

Chain two constraints so that if first is true than the second is evaluated.

Chain two constraints so that if first is true than the second is evaluated.

def andwhenInvalid(otherValidate: () => T): () => T

Chain two constraints so that if first is false than the second is evaluated.

Chain two constraints so that if first is false than the second is evaluated.

def debug: () => T

Prints entity and the result for debug purposes.

Prints entity and the result for debug purposes.

def debugWith(show: T => String): () => T

Prints entity using supplied function and the result for debug purposes.

Prints entity using supplied function and the result for debug purposes.

def or(otherValidate: () => T): () => T

Disjunction. Compose this check with another check and expect at least one of them to pass.

Disjunction. Compose this check with another check and expect at least one of them to pass.

def withErrorPrefix(errorPrefix: String): () => T

Adds prefix to the error messages.

Adds prefix to the error messages.

def withErrorPrefixComputed(errorPrefix: T => String): () => T

Adds computed prefix to the error messages.

Adds computed prefix to the error messages.

def |(otherValidate: () => T): () => T

Disjunction. Compose this check with another check and expect at least one of them to pass.

Disjunction. Compose this check with another check and expect at least one of them to pass.

Concrete fields