Skip to content

Commit

Permalink
fix: Errors are cleared on another submit. #195.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Nov 10, 2022
1 parent 0f0b813 commit e125fae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/app_web/live/app_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,12 @@ defmodule AppWeb.AppLive do
changeset_error_key,
changeset_error_message
) do
# Adding error to changeset

# Clearing and adding error to changeset
cleared_changeset = Map.put(changeset_to_error, :errors, [])
errored_changeset =
Ecto.Changeset.add_error(
changeset_to_error,
cleared_changeset,
changeset_error_key,
changeset_error_message
)
Expand Down

0 comments on commit e125fae

Please sign in to comment.