# E052 — Unsupported changeset form projection

For app developers using the experimental LiveLift compiler.

A marked handler can project a literal field from a supported
`Phoenix.Component.to_form/2` changeset. The form options and the selected
field are part of the compiled expression. Unsupported casts and validators
also use E052. Use literal string fields and the validators in the
[language guide](../language.md).

An option evaluated from the event causes E052. The snippets here illustrate
the rejection and its correction.

```elixir
Phoenix.Component.to_form(changeset, action: params["action"])
```

Use a literal option and select a field included in `cast/3`.

```elixir
Phoenix.HTML.Form.input_value(
  Phoenix.Component.to_form(changeset, action: :validate),
  :title
)
```

For errors, use `Enum.map/2` over the field's errors and return safe values
from the message and `Keyword.get(opts, :count)`. Keep other error metadata,
dynamic form options, and changeset structs in a server handler. Remove
`@client true` to run that handler through LiveView.

The [parity fixture](https://github.com/Manuel1471/LiveLift/blob/main/bench/changeset_parity.exs) uses the supported reads
with actual Ecto and Phoenix forms.
