OGE logoOGE

Input Validation

One editor, three form systems. Validation messages resolve from the i18n config (provideOgeInputsConfig), show per the errorDisplay policy (default: after first blur) and are announced via aria-live. Signal Forms schema constraints (required, minLength, max…) auto-bind into the editors through the FormValueControl contract.

formControl [formField] errorDisplay errorText pending

Standalone validation

No forms library required: drive the error state yourself with the invalid flag and an explicit errorText message. errorDisplay chooses when errors surface — after the first blur (touched, the default), after the first edit (dirty), or immediately (always).

standalone: [invalid] + errorText

Reactive Forms

Bind with formControl/formControlName as usual — the editor renders the control's validation errors in its own subscript, localized through the messages config (required, email, minlength, min/max…). Touched state, markAllAsTouched(), disable/enable and form resets all flow through automatically.

Reactive Forms CVA house pattern touched-gated errors
required + email
status: INVALID · touched: false

Signal Forms

The editors implement Angular's FormValueControl contract, so [formField] binds them natively: schema rules like required(), minLength() and max() push their errors and their constraints (native attributes, number clamping bounds) straight into the editor. Blur emits the contract's touch, driving the field's touched state.

Signal Forms [formField] schema auto-binding
value: · valid: false

Linked fields

Cross-field rules need no event wiring: bind one field's state to another's signal ([disabled], [min]…) and the relationship stays live. When you do want an imperative hook, valueCommitted delivers value, previousValue and the originating DOM event — undefined event means the change was programmatic, not typed.

linked fields (valueCommitted) previousValue cross-field disable
enabled for Company only
lower bound follows Min
Change Max…

Async validation indicator

While a server-side check runs, set pending and a spinner appears in the suffix rail (with screen-reader text). Pair it with showSuccessIcon to confirm a passing value — the success mark hides automatically whenever the field is empty, invalid or pending.

pending (async) + success icon
type to trigger a fake async check