Components
← All components

Form Validation

stimeo--form-validation

Puts timing around the browser's own validation: it blocks the submit and takes you to the first error.

  • Core

Puts sensible timing around the validation the browser already does. The browser's own bubbles are suppressed and the message is shown inside your page instead. A field is checked once you have left it, so nothing turns red before you have even typed in it, and a field that has failed is re-checked as you correct it. On submit everything is checked, an invalid form is stopped, and focus is taken to the first field with a problem. Messages can be written per constraint and per language, and whitespace-only entries can be rejected. A custom widget can join in through a hidden field, with no extra script.

running
Plan

Native rules remain plain HTML attributes (required, type="email"). This demo also localizes their messages and rejects a whitespace-only display name declaratively. The listbox's committed value lives in a validatable mirror (an input with the hidden attribute). Fields validate on blur, recover as you type, and an invalid submit is blocked with focus moved to the first invalid field.

Keyboard

This component has no keyboard interactions of its own.