# query.private.Predicate.validate_text

- **Module:** query.private.Predicate
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/query/private.rs#L348
- **Page:** https://libtmux.org/reference/rs/query-private-predicate-validate_text/

```
query.private.Predicate.validate_text(self) -> Result<(), FilterExpressionError>
```

Validate that this predicate is a well-formed text predicate.

# Errors

Returns [`FilterExpressionErrorKind::UnknownOperator`] for another
scalar family and [`FilterExpressionErrorKind::InvalidStructure`]
for an invalid text value or compiled-regex shape.

The [`crate::query::Filterable`] example executes this method in a
hand-written generated-code expansion.
