# LibTmux.Wire.validate/2

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/wire.ex#L87
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-wire-validate-2/

```
validate(value, options \\ [])
@spec validate(term(), [LibTmux.Filter.limit_option()]) ::
        {:ok, value()} | {:error, LibTmux.Error.t()}
```

Validates already-decoded JSON data and its complete encoded byte size.

Arrays must be proper lists; a malformed tail reports the containing
array's path. An excess prefix returns the list limit before inspecting its tail.

See the [worked example](api-examples.html#encoding-and-protocol).

## Parameters

- `value` (`term()`)
- `options` (`[LibTmux.Filter.limit_option()]`)
