case

fun case(condition: () -> Boolean, body: ValidatorDsl.() -> Unit)(source)

Enters a DSL that is like the current one, but makes every Validator constructed inside body return null when condition returns false during validation.