BitstylesPhoenix.Error.ui_error_tag
You're seeing just the function
ui_error_tag
, go back to BitstylesPhoenix.Error module for more information.
Generates tag for custom errors.
When errors are given in tuples {error, error_opts} they are given to the translate_errors
callback.
The error will be rendered with the warning color, as specified in bitstyles colors.
An error tag
iex> safe_to_string ui_error_tag("Foo error")
~s(<span class="u-fg--warning">Foo error</span>)
An error tag with a gettext tuple (processed by the default callback)
iex> safe_to_string ui_error_tag({"Foo error", count: 1})
~s(<span class="u-fg--warning">Foo error</span>)
An error tag with options
iex> safe_to_string ui_error_tag("Foo error", phx_feedback_for: "foo")
~s(<span class="u-fg--warning" phx-feedback-for="foo">Foo error</span>)