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

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

t()

@type t() :: term()

All the types that implement this protocol.

Functions

to_form_error(exception)