There are two methods for real-time verification:
Instant Verification:
CV. form. validator (jquery ("# QQ "). val (), {type: ["require", "intlength", "int"], Min: 5, Max: 11, errorfunction: function (OBJ, options) {Switch (options. type) {Case "require": {jquery ("# msg_qq "). ATTR ("class", "tips_error" ).html ("enter a common QQ number! "). Show (); break;} case "intlength": {jquery ("# msg_qq "). ATTR ("class", "tips_error" ).html ("enter a common QQ number! "). Show (); break;} case "int": {jquery ("# msg_qq "). ATTR ("class", "tips_error" ).html ("enter the correct QQ number! "). Show (); break ;}}, successfunction: function (OBJ, options) {jquery ("# msg_qq "). ATTR ("class", "tips_ OK" ).html (""). show ();}});
Unified verification after loading:
CV. form. validator. BIND (jquery ("# upload title"), {type: ["require"], successfunction: function (OBJ, options) {_ showmsg ("# msg_upload title", "tips_ OK ", "") ;}, errorfunction: function (OBJ, options) {Switch (options. type) {Case "require": {_ showmsg ("# msg_detail title", "tips_error", "Information title cannot be blank! "); Break ;}}}); jquery (" # upload title "). BIND ("Blur", function () {If (jquery ("# Your title "). val () {cv. form. validator (this );}}). BIND ("Focus", function () {_ showmsg ("# msg_0000title", "tips_info", "enter the information title. ");});
Cv. Form. validator