Form errors are visible while live view is loading

Hi all,

I am seeing form errors while a live view is loading. Then they disappear.
I am using a vanilla Phoenix project with tailwind and core components to render the form.

You can see the source code at:
GitHub - carlotm/form-errors-are-visible

Is this behaviour intended/known, or am I doing something wrong here?

Peek 2023-07-27 17-18


It’s because you’re setting an action:

You don’t want to set an action on a changeset until you are ready to display errors like in a validate or submit callback

To just build the form, you can remove that line

I would move that line to the validate callback


Thank you, it was indeed the reason!