BitstylesPhoenix.Error.ui_errors
You're seeing just the function
ui_errors
, go back to BitstylesPhoenix.Error module for more information.
Generates tag for inlined form input errors.
Uses the translate_errors
callback to translate field errors.
A single error
iex> safe_to_string ui_errors(@error_form, :single)
~s(<span class="u-fg--warning" phx-feedback-for="user_single">is too short</span>)
Multiple errors
iex> safe_to_string ui_errors(@error_form, :multiple)
~s(<ul class="u-padding-l-left u-fg--warning">
<li><span class="u-fg--warning" phx-feedback-for="user_multiple">is simply bad</span></li>
<li><span class="u-fg--warning" phx-feedback-for="user_multiple">not fun</span></li>
</ul>
)