Docs
Validators

Validators

Validators are actually just simple functions that can be plugged into any instance of useForm. They provide a basic set of rules or a schema for validating the form fields. react-form-ally supports this kind of API to allow maximum flexibility for field validation, whether your rolling your own validation or using a third party library such as zod (opens in a new tab) or yup (opens in a new tab).

So far the documentation has only showcased hand-rolled validation. This section seeks to dive into some of our other supported methods and modules. The react-form-ally module is packaged with it's own simple validator function, but there are also modules for zod (opens in a new tab) and yup (opens in a new tab) that can be installed and configured for use in your project.

Would you like to see additional support for a third-party validation library? Feel free to open an issue here (opens in a new tab).