View Source AshPhoenix.FormData.Error protocol (ash_phoenix v1.2.23)

A protocol for allowing errors to be rendered into a form.

To implement, define a to_form_error/1 and return a single error or list of errors of the following shape:

{:field_name, message, replacements}

Replacements is a keyword list to allow for translations, by extracting out the constants like numbers from the message.

Link to this section Summary

Types

t()

All the types that implement this protocol.

Link to this section Types

@type t() :: term()

All the types that implement this protocol.

Link to this section Functions

Link to this function

to_form_error(exception)

View Source