# tmux.Server.ValidateLayouts

- **Module:** tmux
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/2de249b600d65218ee8b8fdc07c6b2b919242151/tmux/server_layout.go#L23
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-validatelayouts/

```
func (s Server) ValidateLayouts(
	ctx context.Context,
	layouts iter.Seq2[string, int],
) error
```

ValidateLayouts checks every layout and its required pane count before any mutation. Nil and empty sequences succeed without I/O unless ctx is canceled. Empty layout strings are ignored. Other entries require at least one pane; classic trees must contain enough leaves. tmux validates JSON contents and geometry when applying the layout.

Names accept unique abbreviations. Version-sensitive names query the selected
daemon through this server's transport; only a cold endpoint without a captured
daemon identity or control connection uses the configured binary's version.
Permission, protocol, decode and cancellation errors are preserved.
Validation errors match
[ErrInvalidServerCommandRequest]; unavailable presets match [ErrVersionTooLow].

## Parameters

- `ctx` (`context.Context`)
- `layouts` (`iter.Seq2[string, int]`)
