# Shadcn Multiple Errors

> Input with multiple error messages

- Type: example, free and open source (MIT)
- Component: [Input](https://reui.io/components/input.md)
- Page: https://reui.io/components/input/c-input-21
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/input.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/input.md
- MCP: `get_example("c-input-21")`
- Registry item: https://reui.io/r/styles/base-nova/c-input-21.json
- Uses: Field, Input

## Best for

A security code field listing 3 failed rules under it, each led by an alert icon

## Agent notes

- The 3 messages and `aria-invalid` are hardcoded; render the rows inside `FieldError` from your validation result

## When not to use

- Rules shown as a live checklist that ticks off while the user types: use [Strength Meter](https://reui.io/components/input/c-input-23.md) (`get_example("c-input-23")`)

## Install

```bash
npx shadcn@latest add @reui/c-input-21
```

## About Shadcn Input

### When to use

- Labeled text, email and search fields, plain or restyled as a pill, an underline or borderless
- Native typed fields for passwords, phones, URLs, numbers, dates, times, files, colors and ranges
- Field states and hints: disabled, required or optional marks, errors, character counts and password strength

### When not to use

- Icons, buttons, units or a prefix that sit inside the border of the box: use [Input Group](https://reui.io/components/input-group.md) (`get_component("input-group")`)
- International numbers chosen by country flag and formatted as the user types: use [Phone Input](https://reui.io/components/phone-input.md) (`get_component("phone-input")`)
- A whole create or edit page that gathers many fields under one save action: use the [Form blocks](https://reui.io/blocks/application/form.md)

### Agent notes

- The red invalid border comes from `aria-invalid` on `Input` in every style; `FieldError` only prints the message

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
