Skip to content

attachFieldValidation

attachFieldValidation(widget, getValue): FieldValidation

Defined in: src/widgets/controls/validation.ts:204

Wires a control into the validation system with the standard prop surface (validation, getValidationValue, validators, validateOn, onValidate, invalid), so a control only supplies how to read its current value. Returns the field’s FieldValidation for use in the control’s render.

InputWidget predates this and inlines the same accessors (it also supports a manual invalid override); new controls should prefer this helper.

Widget

() => unknown

FieldValidation