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 design

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

Screen reader on desktop

Screen reader on mobile devices

Correction and resubmission

Validation while editing

Points to consider

Implementation notes and behavior decisions

  • When navigating to an invalid field, present its label, error indication, and associated message through aria-describedby, while preserving the association with instructions.
  • Use aria-invalid to indicate a detected error; update the state when the error is corrected and new validation confirms the correction.
  • Avoid announcing the same message simultaneously through focus and several aria-live.

References

Additional references for components of type Form validation.

Important:
Most references are on the course platform alongside the lessons cited in this material.

Disclaimer:
The links listed here are a curated collection of references where you can find implemented components, rather than recommendations. There is no unified implementation format and no guarantee that these links follow every design pattern. Direct questions to the teams responsible for the linked materials. Before copying a model, remember that all materials are constantly updated and that patterns, particularly proprietary ones, may change.

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.