mirror of
https://github.com/plausible/analytics.git
synced 2024-12-18 23:11:43 +03:00
10 lines
254 B
Elixir
10 lines
254 B
Elixir
defmodule PlausibleWeb.ErrorHelpers do
|
|
use Phoenix.HTML
|
|
|
|
def error_tag(form, field) do
|
|
Enum.map(Keyword.get_values(form.errors, field), fn error ->
|
|
content_tag(:div, elem(error, 0), class: "text-red text-xs italic mt-3")
|
|
end)
|
|
end
|
|
end
|