ControlValidator
Abstract base class of all form control validators.
A validator is responsible for:
Checking control visibility based on dependencies
Determining whether fields are required, depending on conditions
Basic validation (required, empty state)
Validation specific to the control type
Every control type has its own validator extending this class and implementing validateSpecific() for its specific rules.
Type Parameters
T
type of the data held by the control
Inheritors
Functions
Link copied to clipboard
Checks whether the control is required, based on its configuration and dependencies.
Link copied to clipboard
Link copied to clipboard
private fun isDependencyMet(dependency: ControlDependency<*>, controlContext: ControlContext): Boolean
Link copied to clipboard
Checks whether the value is empty or not filled in.
Link copied to clipboard
internal open fun setupFormReferences(formState: FormState, formSchema: FormSchema, errorManager: ErrorManager)
Sets the form component references for the validator.
Link copied to clipboard
Main validation method of a control.
Link copied to clipboard
Validation specific to the control type, run for a non-null value.