Select your language
Select other languages

Automatic translation

Loading translator…

Magoomake your components work correctlyBack to homepage

Form validation

Messages that identify entry errors, guide corrections, and communicate the result of form submissions.

For working examples and design patterns for this component, see the references tab (opens the references on this page).

COMPONENT GUIDE

Explore behaviors before defining the interface.

Quick guide for designers

Always consider the context of the application, even when the guidance follows a standard pattern. Interaction design documents intent. Behavior must be verified in the implementation.

When to use

Use to explain input problems and guide corrections. Service failures need their own messages.

What to draw

Show instructions, field-level errors, and a linked summary where appropriate. Explain corrections in text beyond color or icons.

How it behaves

Preserve values after invalid submission. Summary links lead to the field. Do not show errors before the person has had a chance to enter data.

What to document in Figma

Define validation timing, focus after invalid submission, and announcements. For asynchronous checks, consider the current value and avoid stale responses.

How to review

Check whether the purpose and states are clear on small and large screens and with zoom. Verify documented behavior in the implementation, including keyboard and screen reader use where applicable.

Full guidance

Interaction Design

Questions to ask when designing form validation messages.

Assess each guideline in context. Validation reports entry problems and guides correction; service failures require their own messages.

Designing for "no interaction"

Designing for mouse use

Designing for gesture use

Designing for keyboard use

Designing for screen reader use

Interaction methods

Mouse interaction

Keyboard interaction

Gesture interaction

Keyboard (or gesture) interaction + screen reader

Correction and resubmission

Gherkin

BDD (Behavior-Driven Development) methodology focusing on three pillars: User Stories, Acceptance Criteria, and Gherkin Syntax (Given, When, Then).

Scenario: Given that I am on a page containing a form with validation

Keyboard navigation

Desktop screen reader

Mobile screen reader

Correction and resubmission

Validation while editing

Considerations

References

Design patterns

Design System

Original content by Marcelo Sales, initially used in the AccessBoost course (external link - opens in a new window). These interactions represent standard industry patterns, but may be customized in specific cases, provided there are sufficient instructions for people to understand the behavioral change.