LiveView: Form Errors Not Showing Up


I am trying to figure out why my LiveView forms aren’t displaying errors. It looks like they are being set in the appropriate handle_event callback, but they are nowhere to be seen despite being printed in my templates. :man_shrugging:

You can find my code here: GitHub - danieljaouen/phoenix_modal_example

With the most relevant code being located in lib/modal_example_web/live/modal_example_live.ex and lib/modal_example_web/live/modal_example_live.html.heex.

Any help is greatly appreciated. Thanks!

Try removing phx-update="ignore" from the modal divs that wrap your forms.

  • ignore - ignores updates to the DOM regardless of new content changes

    The “ignore” behaviour is frequently used when you need to integrate with another JS library. Note only the element contents are ignored, its attributes can still be updated.

source: DOM patching & temporary assigns — Phoenix LiveView v0.19.5

1 Like

Yep, that did the trick. Thanks, @codeanpeace!!