checks

infix inline fun () -> Boolean.checks(crossinline error: () -> ValidationError): Sequence<ValidationError>
@JvmName(name = "checksAll")
infix inline fun () -> Boolean.checks(crossinline error: () -> Iterable<ValidationError>): Sequence<ValidationError>

A function that evaluates this lambda, and if it returns false, returns the result of error wrapped in a sequence. Shorthand for an if statement and a sequence build