check
Adds a Validator to the outer ValidatorDsl that checks property's value with validate.
fun check(isValid: ValidatorDsl.OfDsl<T>.(T) -> Boolean, message: ValidatorDsl.OfDsl<T>.(T) -> String): ValidatorDsl.OfDsl<T>(source)
Adds a Validator to the outer ValidatorDsl that checks the property's value with isValid.
If isValid is true
, then the created Validator returns null
, and returns message applied to property's value otherwise.