Adding A Robust Form Validation To React Redux Apps
阿新 • • 發佈:2019-01-16
Adding A Robust Form Validation To React Redux Apps
Form validation is vital because it helps with the UX. It helps user know that there is something wrong with what they’ve entered or if they’ve missed something and so on.
A “robust” form validation helps with (at least):
- Client-side Validation: e.g. Check empty fields, password length etc.
- Instant Server-side Validation: e.g. Instantly check server if username is unique upon blur.
- OnSubmit Server-side Validation: e.g. Check server after submit
- Prevent Duplicate submission: e.g. Disable Submit-button after submit.
But implementing such a form validation is a lot of work in any framework including Redux apps.
Use libraries