BooleanRuleTester

class BooleanRuleTester(val predicate: Boolean.() -> Boolean, val message: () -> String) : ValidationRule<Boolean>

A rule that tests the boolean value.

Constructors

Link copied to clipboard
constructor(predicate: Boolean.() -> Boolean, message: () -> String)

Creates a new instance of BooleanRuleTester.

Properties

Link copied to clipboard
val message: () -> String

The message to return when the test fails.

Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun test(value: Boolean): FieldErrors

Tests the given value against this rule.