FloatRuleTester

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

A rule that tests the float value.

Constructors

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

Creates a new instance of FloatRuleTester.

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 float value. Returns true if the test passes; false otherwise.

Functions

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

Tests the given value against this rule.