The native HTML5 validation feature is not enough.
We also recommend you to use a JavaScript library to extend and enhance the default form validation functionalities for better user experiences on modern web design.
In this post, you’ll find a list of 7 best and most downloaded JavaScript Form Validation libraries (without any 3rd dependencies such as jQuery) to validate your HTML form with custom error messages, CSS styles, validation rules and more. Enjoy.
Originally Published Feb 10, 2018, updated Jan 7 2019
1. Just-validate
Just-validate is a dependency-free, HTML5 data attribute based form validation that supports both client side and server side form validation. Validation rules are fully customizable via JavaScript. Compatible with Bootstrap framework.
2. popup-validation
Loaderplate is a simple, lightweight javascript library that uses SVG icons to generate an animated loading spinner on a given container.
3. okjs
okjs is a JavaScript library used to extend the HTML5 form validation api that supports custom field validation rules & error messages. Without any 3rd dependencies.
4. js-form-validator.js
An easy-to-use yet fully customizable form field validator built using native JavaScript with no 3rd JavaScript libraries.
5. Custom HTML5 Data Validation
A small form validation script that automatically highlights invalid form fields and displays custom error messages using HTML5 validation attributes.
6. native-validations
native-validations is a JavaScript library to enhance and replace the native HTML5 form validation with custom styles and error messages.
7. formvalidatorjs
formvalidatorjs is a lightweight, unobtrusive form validator written in vanilla JavaScript that works with the native HTML5 data validation.