# `A2UICore.Validation.Integrity`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_core/lib/a2ui_core/validation/integrity.ex#L1)

Payload preflight checks that run before schema validation:
global nesting depth, nested function-call depth, and JSON-pointer
path syntax. Ported verbatim from the reference's
`validate_recursion_and_paths`.

Limits:

  * `@max_global_depth` (50) — nesting depth of the whole payload.
  * `@max_func_call_depth` (5) — nesting of `call`/`@call`+`args`
    (or v0.8 `functionCall`) structures.

Path keys checked: `"path"` and `"@path"` (v1.0 binds with `@path`;
templates and `updateDataModel` use `path`). The relaxed pointer
pattern allows absolute (`/a/b`) and relative (`a/b`) forms with
RFC 6901 escapes (`~0`, `~1` only).

# `max_func_call_depth`
*since 0.1.0* 

```elixir
@spec max_func_call_depth() :: pos_integer()
```

The nested function-call limit.

# `max_global_depth`
*since 0.1.0* 

```elixir
@spec max_global_depth() :: pos_integer()
```

The global payload nesting limit.

# `validate_recursion_and_paths`
*since 0.1.0* 

```elixir
@spec validate_recursion_and_paths(term()) :: :ok | {:error, A2UICore.Error.t()}
```

As `validate_recursion_and_paths!/1`, returning `:ok | {:error, error}`
instead of raising.

# `validate_recursion_and_paths!`
*since 0.1.0* 

```elixir
@spec validate_recursion_and_paths!(term()) :: :ok
```

Traverses a message payload, raising `A2UICore.Error` (category
`:recursion` or `:validation`) when a limit or path syntax is
violated. Returns `:ok` otherwise.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
