validate

open fun validate(controlContext: ControlContext, state: ControlState<*>, control: Control<*>)

Main validation method of a control.

Validation:

  1. Checks whether the control is visible (if not, skips validation)

  2. Determines whether the control is required

  3. Checks that a required field is not empty

  4. Runs the validation specific to the control type

Parameters

state

control state

control

control definition