# Inline or Summary
> Say what happened and how to fix it, next to where it happened, without losing anyone’s work.

## Situation

Is it one mistake, or several at once?

## Decision

### Use Inline when

One field is wrong, or you can check it as people leave the field. The fix sits right beside the problem.

- A single field has the problem
- Validation when leaving the field
- Short forms
- Format hints for dates and phone numbers

### Use Summary when

Submitting finds several problems at once, often in a long form. A summary at the top counts them and links to each field. Keep the inline messages too.

- Several errors after submit
- Long or multi-section forms
- Checks that run on the server
- Keyboard and screen reader users need one place to land

**The numbers:** One error: inline only. Two or more after submit: a summary at the top with a count and a link to each field, plus the inline messages. Validate a field when people leave it, never on every keystroke.

## Why

Submitting can surface several server errors at once, so a summary tells people how many there are and takes them to each one. The inline messages stay so the fix sits next to the field.

## Edge cases

Very short forms, like a login. Even with two errors, inline is enough: the whole form is already in view.

Source: https://www.designdecisions.dev/cards/inline-summary
Author: Alex Dovhyi
