# LibTmux.Server.IsValidLayoutCandidate

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Server.Layout.cs#L23
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-server-isvalidlayoutcandidate/

```
LibTmux.Server.IsValidLayoutCandidate(layout: string, paneCount: int) -> bool
```

Checks a layout's syntax without contacting a server.

This is the version-independent half of <see cref="ValidateLayoutsAsync" />:
it never contacts tmux, so it cannot catch a named layout that only some
daemon versions accept. Call it at parse time, before a document is
otherwise trusted; call <see cref="ValidateLayoutsAsync" /> afterward to
catch a version-sensitive name.

## Parameters

- `layout` (`string`): A custom layout string or a named layout.
- `paneCount` (`int`): The number of panes the layout must accommodate.

## Returns

<see langword="true" /> when the checksum, cell tree and cell count are
consistent for a custom layout, or the name is an unambiguous prefix of
a named layout.
