View Source AshAuthentication.Validations.Action (ash_authentication v4.2.5)

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

Link to this function

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.

Link to this function

validate_action_exists(dsl_state, action_name)

View Source
@spec validate_action_exists(map(), atom()) ::
  {:ok, Ash.Resource.Actions.action()} | {:error, Exception.t() | String.t()}

Validate that a named action actually exists.

Link to this function

validate_action_has_argument(action, argument_name)

View Source
@spec validate_action_has_argument(Ash.Resource.Actions.action(), atom()) ::
  :ok | {:error, Exception.t()}

Validate the presence of an argument on an action.

Link to this function

validate_action_has_change(action, change_module)

View Source
@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.

Link to this function

validate_action_has_manual(action, manual_module)

View Source
@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.

Link to this function

validate_action_has_preparation(action, preparation_module)

View Source
@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.

Link to this function

validate_action_has_validation(action, validation_module)

View Source
@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.

Link to this function

validate_action_option(action, field, values)

View Source
@spec validate_action_option(Ash.Resource.Actions.action(), atom(), [any()]) ::
  :ok | {:error, Exception.t()}

Validate the action has the provided option.