ObjectRuleChainer

class ObjectRuleChainer<V, S>(val transform: (V) -> S) : ValidationRule<V>

A rule that chains a transformation function with a set of rules.

Constructors

Link copied to clipboard
constructor(transform: (V) -> S)

Creates a new instance of ObjectRuleChainer.

Properties

Link copied to clipboard
val transform: (V) -> S

The transformation function to apply to the object value.

Functions

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

Tests the given value against this rule.

Link copied to clipboard
infix fun then(block: ValidationRuleBuilder<S>.() -> Unit)

Chains a set of rules to the transformation function.