View Source AshPhoenix.FormData.Error protocol (ash_phoenix v2.1.8)

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.

Summary

Types

t()

All the types that implement this protocol.

Types

@type t() :: term()

All the types that implement this protocol.

Functions

Link to this function

to_form_error(exception)

View Source