satisfy
fun <V : Any> ObjectRuleBuilder<V>.satisfy(predicate: V.() -> Boolean, message: () -> String)(source)
Validates that the object value passes the given predicate.
Usage:
rules<Post> {
satisfy({ 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.