The most complete
form validation collection for React
Over 36 validators which don't require installation. Clean JS & TS codes with unit tests.
Here are examples of validators that await. Give it a try.
There are 3 validations, namely:
- Username is required
- Username input requires at least 8 characters
- Username input only accepts alphabets, number, dash (-) and underscore (_)
export const formResolver: Resolver<FormValue> = async (values) => {
const errors: FieldErrors<FormValue> = {};
const requiredUsername = requiredValidator(
values.username,
"Please provide username"
);
errors.username = requiredUsername
? requiredUsername
: usernameValidator(values.username);
const keys = Object.keys(errors);
const allUndefined = keys.every((key) => !errors[key as keyof FormValue]);
return {
values: values || {},
errors: allUndefined ? {} : errors,
};
}
TypeScript & JavaScript Codebase
Validex provides functions in both TypeScript and JavaScript, ensuring scalability and compatibility with any of your React project.
Flexible Validation Options
Choose your validation approach to fit your needs. Whether you prefer functions with or without regex (when applicable), You can pick a function to use in your React form.
React Compatibility
The form validation collection is designed to work with any React UI (MUI, Ant Design or Chakra) or form library (React Hook Form or Formik) Make it the ideal companion for your diverse development environments.
Customize With Ease
Crafted with flexibility in mind, validation functions provided by Validex can be modified easily, ensuring they align with your specific requirements.
Production Ready
We take our form validations seriously. Every piece of code is rigorously tested and production ready. Each validator has a set of unit test (spec.ts) to demonstrate reliability.
Developer Friendly
Our comprehensive documentation is designed for easy navigation with clear structures and categories. The guide is, complemented by an interactive demo which you can test our validators with, making your journey with Validex smoother.
Continuous Support and Update
We aim to expand and improve the form validation collection to
significantly reduce your time on React form development.
Validations for Email, Phone, Password, String, Numeric, Selection, BIC, IBAN, URL and more...
Want another validator? Reach out at [email protected]
Add validators into
your React form instantly
Copy and paste
No library needed. Just copy from Validex and paste to use in your React form
Download Zip
Download validations for offline use. Zip has files like readme, JS & TS codes and unit tests.
Smart VS Code Plugin
Install Validex plugin. Simply start typing a validator to add it into your React form.
Limited-Time Offer
A simple pricing with no hidden cost. We want as many developers as possible to utilize these features at a reasonable price while keeping our lights on.
Get Access now to get 40% off when launch
Get Access now to get 40% off when launch
50% discount for an additional year of update and support
Be the first to know
We'll inform you when the form validations are ready. No spam, we promise.