ValidationScopes

sealed class ValidationScopes<T> : Set<T?> (source)

Validation scopes under which a validation is allowed to run. These can be specified via an allow list with OneOf or via a deny list with NotOneOf.

Note that, if no scope is provided as an external context during runtime, the default scope will be null. In this scenario, for the allow list case, unless null is explicitely passed to OneOf, the validation will never run; similarly, for the deny list case, unless null is explicitely passed to NotOneOf, the validation will always run.

Inheritors

Types

Link copied to clipboard
class NotOneOf<T>(scopes: Iterable<T?>) : ValidationScopes<T>

Deny list of scopes under which the validation should not run.

Link copied to clipboard
class OneOf<T>(scopes: Iterable<T?>) : ValidationScopes<T>

Allow list of scopes under which the validation should run.

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
abstract fun allows(scope: T?): Boolean

Whether the validation scopes allow the provided scope.

Link copied to clipboard
open operator override fun contains(element: T?): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<T?>): Boolean
Link copied to clipboard

Returns whether a collection of located validation issues contains any errors.

Link copied to clipboard

Returns whether a collection of located validation issues contains any issues at all.

Link copied to clipboard

Returns whether a collection of located validation issues contains no errors.

Link copied to clipboard

Returns whether a collection of located validation issues contains no issues at all.

Link copied to clipboard

Returns whether a collection of located validation issues contains no warnings.

Link copied to clipboard

Returns whether a collection of located validation issues contains any warnings.

Link copied to clipboard

Utility function which converts the paths of an iterable of LocatedValidationIssues where table rows are indexed by their index into paths where said rows are indexed by their id in the corresponding table within the provided form value formValue (with schema formSchema).

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<T?>
Link copied to clipboard

Creates a table from a Collection, using auto-generated identifiers.

fun <T> Iterable<T>.toTable(): Table<T>

Creates a table from an Iterable, using auto-generated identifiers.