jQuery.Validate 使用笔记

校验规则参数

格式为; name:{rule1, rule2 ....}   name 要使用input 标签的name,之前,错误理解为 ID 了;

提示信息使用 alert 输出:

 errorPlacement: function (error, element) {                            
                if (error[0].textContent){
                    Alert(error[0].textContext);
                }
                else {                   
                    Alert(error[0].innerText);                                        
                }
            }

原文地址:https://www.cnblogs.com/xlong1900/p/1764704.html