> For the complete documentation index, see [llms.txt](https://radoslaw-medryk.gitbook.io/verifica/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://radoslaw-medryk.gitbook.io/verifica/predicates.md).

# Predicates

Predicates are functions defining validation rules in verifica. Examples are: isString, isNumberInRange, etc.

## ❓ What are predicates?

Predicates are functions, that define if a value represented by `Verificable` object matches certain condition. They are then passed into validation methods (i.e. `ensure()`, `getErrors()`, `isValid()`) where the `Verificable` is checked for matching the `Predicate`.

`Predicate` functions can (and should!) be written by you to define your specific validation needs.

There is also a number of `Predicate` functions built in the library (e.g. `isString`, `isObject`, etc.) that can be used to validate simple values, or used within your own custom `Predicate` functions as building blocks for more complex rules.
