# LibTmux.Filter.new/3

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/filter.ex#L46
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-filter-new-3/

```
new(entity, criteria, options \\ [])
@spec new(LibTmux.Schema.entity_selector(), input(), [
        limit_option()
      ]) ::
        {:ok, t()} | {:error, LibTmux.Error.t()}
```

Normalizes criteria and validates field/operator/value domains before evaluation.

An existing filter retains its constructor's validation when no new limits
are supplied. Explicit limits check the normalized tree directly, without
expanding it into synthetic input syntax.

See the [worked example](api-examples.html#local-graph-and-filtering).

## Parameters

- `entity` (`LibTmux.Schema.entity_selector()`)
- `criteria` (`input()`)
- `options` (`[limit_option()]`)
