BooleanRule

fun BooleanRule(predicate: Boolean.() -> Boolean, message: () -> String): BooleanRule

A rule that tests the boolean value.

Return

Creates a new instance of BooleanRule.

Parameters

predicate

The predicate to test the boolean value. Returns true if the test passes; false otherwise.

message

The message to return when the test fails.