AshAuthentication.Phoenix.Components.RecoveryCode.Input (ash_authentication_phoenix v3.0.0-rc.6)

View Source

Function components for recovery code form inputs.

Component hierarchy

These function components are consumed by AshAuthentication.Phoenix.Components.RecoveryCode.VerifyForm and AshAuthentication.Phoenix.Components.RecoveryCode.DisplayCodes.

Overrides

This component provides the following overrides:

  • :field_class - CSS class for div elements surrounding the fields.
  • :label_class - CSS class for label elements.
  • :input_class - CSS class for input elements.
  • :submit_class - CSS class for the form submit input element.
  • :error_ul - CSS class for the ul element on error lists.
  • :error_li - CSS class for the li elements on error lists.
  • :input_class_with_error - CSS class for input elements when there is a validation error.
  • :input_debounce - Number of milliseconds to debounce input by (or nil to disable).
  • :code_input_label - Label for recovery code field.
  • :code_input_placeholder - Placeholder for recovery code field.

See AshAuthentication.Phoenix.Overrides for more information.

Summary

Functions

Generate a form field for the recovery code.

Generate a list of errors for a field.

Generate a form submit button.

Functions

code_field(assigns)

@spec code_field(%{
  :form => AshPhoenix.Form.t(),
  optional(:overrides) => [module()],
  optional(:gettext_fn) => {module(), atom()}
}) :: Phoenix.LiveView.Rendered.t() | no_return()

Generate a form field for the recovery code.

error(assigns)

@spec error(%{
  :form => AshPhoenix.Form.t(),
  :field => atom(),
  optional(:overrides) => [module()],
  optional(:gettext_fn) => {module(), atom()}
}) :: Phoenix.LiveView.Rendered.t() | no_return()

Generate a list of errors for a field.

submit(assigns)

@spec submit(%{
  :id => String.t(),
  optional(:label) => String.t(),
  optional(:disable_text) => String.t(),
  optional(:overrides) => [module()],
  optional(:gettext_fn) => {module(), atom()}
}) :: Phoenix.LiveView.Rendered.t() | no_return()

Generate a form submit button.