IntRuleTester

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

A rule that tests the integer value.

Constructors

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

Creates a new instance of IntRuleTester.

Properties

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

The message to return when the test fails.

Link copied to clipboard
val predicate: Int.() -> Boolean

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

Functions

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

Tests the given value against this rule.