# `AshPhoenix.FormData.Error`
[🔗](https://github.com/ash-project/ash_phoenix/blob/v2.3.21/lib/ash_phoenix/form_data/error.ex#L5)

A protocol for allowing errors to be rendered into a form.

To implement, define a `to_form_error/1` and return a single error or list of errors of the following shape:

`{:field_name, message, replacements}`

Replacements is a keyword list to allow for translations, by extracting out the constants like numbers from the message.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `to_form_error`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
