Skip to content

Commit

Permalink
fix: Form doesn't show an error [MDS-1384] (#864)
Browse files Browse the repository at this point in the history
* fix: Form doesn't show an error [MDS-1384]

* fix: Form to display errors [MDS-1384]

---------

Co-authored-by: Dmytro Kireiev <[email protected]>
  • Loading branch information
ffcabbar and dkireev authored Dec 20, 2024
1 parent 694f91d commit 6fe489a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.89.1
2.89.2
2 changes: 1 addition & 1 deletion lib/moon/helpers/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule Moon.Helpers.Form do
has_error(source, field)
end

def has_error(_form = %{errors: errors, action: action}, field) when not is_nil(action) do
def has_error(_form = %{errors: errors}, field) do
Enum.count(Keyword.get_values(errors || [], field)) > 0
end

Expand Down

0 comments on commit 6fe489a

Please sign in to comment.