JavaScript form validation ,which is lightweight and easy.
Rencently I need a form validation in some program having the same validate rules and style.I find parsley,which can validate the form data with same rules ,but it have different error styles and so complex.So,I decided to write a myself form validation to do with these program.
using npm
npm install mvform --save
or using bower
bower install mvform --save
More examlpes to see /examples
directory,which include four way to use mvform
.
- base form validation
- define your own error message
- define your own error container element
- single element validaton
I use the bootstrap as css framwork.The form is horizontal,the error message will append to the label.So,bootstrap is the best choice to use with myform
.You can use mvform
just as form validation ,then writing your own css style based on the mvform
css style.
I welcome contributions of all kinds from anyone.
Licensed under the MIT License