$.validator.addMethod("isPhone", function(value,element) { var length = value.length; var mobile = /^1[3456789]d{9}$/; return this.optional(element) || (length == 11 && mobile.test(value)); }, "请正确填写您的联系电话");
菜鸟教程:https://www.runoob.com/jquery/jquery-plugin-validate.html
调用: isPhone:true