formulator v0.1.8 Formulator.HtmlError

Link to this section Summary

Functions

Returns a struct with the appropriate error class and html for a form error

Link to this section Functions

Link to this function html_error(form, field)
html_error(Phoenix.HTML.Form.t(), atom()) :: %Formulator.HtmlError{class: term(), html: term()}

Returns a struct with the appropriate error class and html for a form error.

If there are errors on the given field, it will have a class to use in the form field in the :class field and an appropriate html tag to display the error message in the :html field.