Arcadic.Identifier (Arcadic v0.1.0)

Copy Markdown View Source

Allowlist validation for identifiers arcadic places into a URL path or a statement (database names, labels, property names).

Values are never identifiers — they ride the params map. This guards the identifier surface only (AGENTS.md Critical Rule 2). A failure carries the invalid-SHAPE fact only, never the offending string (it may be attacker- controlled or contain a secret).

Summary

Functions

Boolean form of validate/1.

Returns :ok for a valid identifier, {:error, :invalid_identifier} otherwise.

Functions

valid?(value)

@spec valid?(term()) :: boolean()

Boolean form of validate/1.

validate(value)

@spec validate(term()) :: :ok | {:error, :invalid_identifier}

Returns :ok for a valid identifier, {:error, :invalid_identifier} otherwise.