ArrayRuleTester

class ArrayRuleTester<V>(val predicate: Array<V>.() -> Boolean, val message: () -> String) : ValidationRule<Array<V>>

A rule that tests the array value.

Constructors

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

Creates a new instance of ArrayRuleTester.

Properties

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

The message to return when the test fails.

Link copied to clipboard
val predicate: Array<V>.() -> Boolean

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

Functions

Link copied to clipboard
open override fun test(value: Array<V>): FieldErrors

Tests the given value against this rule.