# tmux_filter:from_wire/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_filter.erl#L99
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_filter-from_wire-2/

```
from_wire(Entity, Document)
-spec from_wire(tmux_schema:entity(), term()) ->
                   {ok, t()} | {error, map()}.
```

Validate a versioned filter document using generated wire-name allowlists. Rejects unknown fields, operators, wrong entity/version and resource limits. No payload key becomes an atom; this does not execute a query.

## Parameters

- `Entity` (`tmux_schema:entity()`)
- `Document` (`term()`)
