
Description
redux-form-validators is a JavaScript library of ready-made validation rules for forms built with redux-form or react-final-form. Its design is inspired by Rails validations, and it provides validators for presence, email, numericality, date, length, confirmation, format, acceptance, inclusion, exclusion, absence, url and file. You add the validators a field needs, and the library runs them when the form is checked. A validateForm helper covers whole-form checks, and a combine helper merges rules. The README covers default options, memoization, internationalization with react-intl, overriding the default messages, common validation options, conditional validation, adding your own validator, and date and URL helpers. Each validator has a default error message, such as 'is required' for presence, and accepts a custom message through its message option. The library installs with a single npm command. It is aimed at React developers who handle form validation with redux-form or react-final-form. A live demo and an example project are linked from the README, so you can try the validators before adding them to your own code.…
Highlights
- Validators for presence, email, length, url and more
- Works with redux-form and react-final-form
- Field-level and whole-form validation
- Custom messages and react-intl support
- Install with npm
Ratings & Reviews
No ratings yet
Be the first to rate redux-form-validators.
People also visit
redux-form-validators FAQ
What is redux-form-validators?
A JavaScript library of validation rules for forms built with redux-form or react-final-form.
How do I install it?
Run npm install redux-form-validators. The README notes it is compatible with react-intl for translated messages.
Which validators does it include?
Presence, email, numericality, date, length, confirmation, format, acceptance, inclusion, exclusion, absence, url and file, plus form-level helpers.
Can I change the error messages?
Yes. Each validator has a default message, and you can pass your own with the message option.
Does it support conditional validation?
Yes. The documentation includes a section on conditional validation.
What are the best redux-form-validators alternatives?
Popular alternatives to redux-form-validators include formsy-react, rc-field-form and vee-validate. See all redux-form-validators alternatives













