View Source AshAuthentication.Validations.Action (ash_authentication v4.0.0)
Validation helpers for Resource actions.
Summary
Functions
Validate an action's argument has an option set to one of the provided values.
Validate that a named action actually exists.
Validate the presence of an argument on an action.
Validate the presence of the named change module on an action.
Validate the presence of the named manual module on an action.
Validate the presence of the named preparation module on an action.
Validate the presence of the named validation module on an action.
Validate the action has the provided option.
Functions
validate_action_argument_option(action, argument_name, field, values)
View Source@spec validate_action_argument_option(Ash.Resource.Actions.action(), atom(), atom(), [ any() ]) :: :ok | {:error, Exception.t() | String.t()}
Validate an action's argument has an option set to one of the provided values.
@spec validate_action_exists(map(), atom()) :: {:ok, Ash.Resource.Actions.action()} | {:error, Exception.t() | String.t()}
Validate that a named action actually exists.
@spec validate_action_has_argument(Ash.Resource.Actions.action(), atom()) :: :ok | {:error, Exception.t()}
Validate the presence of an argument on an action.
@spec validate_action_has_change(Ash.Resource.Actions.action(), module()) :: :ok | {:error, Exception.t()}
Validate the presence of the named change module on an action.
@spec validate_action_has_manual(Ash.Resource.Actions.action(), module()) :: :ok | {:error, Exception.t()}
Validate the presence of the named manual module on an action.
@spec validate_action_has_preparation(Ash.Resource.Actions.action(), module()) :: :ok | {:error, Exception.t()}
Validate the presence of the named preparation module on an action.
@spec validate_action_has_validation(Ash.Resource.Actions.action(), module()) :: :ok | {:error, Exception.t()}
Validate the presence of the named validation module on an action.
@spec validate_action_option(Ash.Resource.Actions.action(), atom(), [any()]) :: :ok | {:error, Exception.t()}
Validate the action has the provided option.