View Source AshAuthentication.Validations.Attribute (ash_authentication v4.3.5)

Validation helpers for Resource attributes.

Summary

Functions

Validate that an option is set correctly on an attribute

Validate than an attribute has a unique identity applied.

Functions

validate_attribute_option(attribute, resource, field, values)

@spec validate_attribute_option(Ash.Resource.Attribute.t(), module(), atom(), [any()]) ::
  :ok | {:error, Exception.t()}

Validate that an option is set correctly on an attribute

validate_attribute_unique_constraint(dsl_state, fields, resource)

@spec validate_attribute_unique_constraint(map(), [atom()], module()) ::
  :ok | {:error, Exception.t()}

Validate than an attribute has a unique identity applied.