test
Validates that the object value passes the given predicate.
Usage:
rules<Post> {
test({ title.isNotBlank() }) { "Title must be not blank" }
}
Content copied to clipboard
Parameters
predicate
The predicate to test the object value. Returns true
if the test passes; false
otherwise.
message
The message to return when the test fails.