Introduction
This library offers painless FormData validation. With expressive syntax that supports multiple input types such as boolean, string, number, and date. Additionally, array validation through the use of []
and .*
notations.
It also offers a versatile .custom(attribute: string, value: any, formData: FormData)
validation method. This allows users to perform custom validation according to their specific requirements.
Installation
To install, use your preferred package manager:
Basic Usage
Once installed, integrating it into your project is simple. Below is a basic example to help you get started:
Here we use Svelte’s Form actions, if you’re using a different framework, as long as you’re passing FormData, this should work too.
Next Steps
Congratulations on successfully installing and executing basic validation! Explore the documentation further to delve into more advanced validation techniques, available rules, custom error messages, and integration with different frameworks or libraries.