标签:col ges location span tor pre value turn add
//添加驗證規則 $.validator.addMethod("macaoMobile", function (value, element) { var reg = /^6\d{7}$/; return reg.test(value); }, ""); //表單驗證 $("#formMobile").validate({ rules: { mobile: { required: true, macaoMobile: true }, realName: { required: true } }, messages: { mobile: { required: ‘<i class="fa fa-exclamation-circle"></i>接收手機號碼不能為空‘, macaoMobile: ‘<i class="fa fa-exclamation-circle"></i>請正確填寫接收手機號碼‘ }, realName: { required: ‘<i class="fa fa-exclamation-circle"></i>姓名不能爲空‘ } } }) if (!$("#formMobile").valid()) { window.location.href = "#buyerInfo"; return; }
标签:col ges location span tor pre value turn add
原文地址:https://www.cnblogs.com/MyBlog-/p/9689608.html