ValidationResult<T, E extends ValidationError> extension

Extensions to facilitate manipulating validation results.

on

Properties

firstError → E?

Available on Either<List<E>, T>, provided by the ValidationResult extension

Gets the first error according to the composition sequence used creating of calling validation result
no setter

Methods

errorsGroupedBy<K>(Selector<E, K> tagSelector) Map<K, List<E>>

Available on Either<List<E>, T>, provided by the ValidationResult extension

Returns a map of grouped validation errors keyed by a formfield type.
singleErrorsBy<K>(Selector<E, K> tagSelector) Map<K, String>

Available on Either<List<E>, T>, provided by the ValidationResult extension

Returns a map of formfield, error key value pairs.