If you don’t need to do instant verification of onfocus and onblur, if you don’t want to define validation rules through JS for each form, if you only need one verification and feedback when submitting, if you like a simple code structure , I think simpleValidate is a good choice.
Judging from the attention and downloads, this plug-in is not very popular, but it doesn’t matter, it is my favorite.
The download address is at the bottom, it is open source, the DEMO is very detailed, and it is quite easy to get started.
The original version does not support IE because the commas and length of JSON are reserved words. The fix is to delete all unnecessary commas before "}" and use other variable names for the variable length. I changed one, The prompt content has been Chineseized and is currently in use. No other bugs have been found yet. Download address: jquery.simple.validation.js
Define the data-rules attribute:
Use the pound sign "#" to distinguish multiple verification rules, use the plus sign " " to attach the verification comparison value, and use the horizontal bar "-" to attach the feedback project title. The following is the basic writing method
Define all forms to be verified before submission:
Project open source address: https://github.com/capucinno-lee/jquery-simple-validation
DEMO address: http://demo.jb51.net/js /2014/jquery_simple_validation/