View Source TestWeb.ErrorHelpers (Exzeitable v0.6.8)

Conveniences for translating and building error messages.

Summary

Functions

Generates tag for inlined form input errors.

Translates an error message using gettext.

Functions

error_tag(form, field)

@spec error_tag(
  atom() | %{:errors => [{any(), any()}], optional(any()) => any()},
  atom()
) :: list()

Generates tag for inlined form input errors.

translate_error(arg)

@spec translate_error({binary(), keyword() | map()}) :: binary()

Translates an error message using gettext.