Form Validation

Validation of Regular Forms

HTML form validation is performed client (JavaScript) and server side (actually PHP-only). The server-side form validation can be fallback (JavaScript is disabled in the browser or fails) or superset.

If a HTML control fails to validate in the regular HTML form, red bars are displayed to mark both the error message and the control. A question mark as dynamic link to the HTML control helps mobile-device users to set the focus on it without wiping the device.

Client-side HTML form validation
Client-side HTML form validation
Server-side HTML form validation
Server-side HTML form validation

Validation of Accessible Forms

If an input field fails to validate in the accessible HTML form, red bars are displayed to mark both the error message and the input field to guide the visually-impaired user. A question mark as dynamic link to the input field helps to set the focus on it without manual scrolling. The blind user is assisted by aria-invalid and role="alert".

Client-side HTML form validation
Accessible client-side HTML form validation
Server-side HTML form validation
Accessible server-side HTML form validation