CollectionRuleTester

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

A rule that tests the collection value.

Constructors

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

Creates a new instance of CollectionRuleTester.

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

Functions

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

Tests the given value against this rule.