cast
Chains a transformation function with a set of rules.
Usage:
rules<String> {
notBlank { "must be not blank" }
cast { it.length } then {
minimum(3) { "must be at least 3 characters" }
maximum(20) { "must be at most 20 characters" }
}
}
Content copied to clipboard
Parameters
transform
The transformation function to apply to the object value.