jQuery.noConflict(); jQuery(document).ready(function($) { jQuery.formValidator.initConfig({validatorgroup : "allinpay_fast_bocidentifyform",formid:"allinpay_fast_bocidentifyform",alertmessage:true,onerror:function(msg){ alert(msg); } }); jQuery("#allinpay_fast_bocidentifyform_customerappellation").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_customerappellation",onshow:"银行卡户主身份信息必须与基金账户户主身份信息相同!",onfocus:"银行卡户主身份信息必须与基金账户户主身份信息相同!",oncorrect:""}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"姓名不合规范,请重新输入!"},onerror:"姓名不合规范,请重新输入!"}).regexValidator({regexp:"^[\\u4e00-\\u9fa5\\u2E80-\\uFE4F\\wa-zA-Z\\(\\)\\.\\¡¤\\s\\u00b7]{2,30}$",onerror:"姓名不合规范,请重新输入!"}) jQuery("#allinpay_fast_bocidentifyform_customerappellation").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_bankacco").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_bankacco",onshow:"只能是借记卡,存折和信用卡不能用于基金网上交易!",onfocus:"只能是借记卡,存折和信用卡不能用于基金网上交易!",oncorrect:""}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"请输入银行卡卡号!"},onerror:"请输入银行卡卡号!"}).regexValidator({regexp:"^[\\d]{16,19}$",onerror:"银行卡卡号不合规范,请重新输入!"}) jQuery("#allinpay_fast_bocidentifyform_bankacco").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_identityno").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_identityno",onshow:"请正确填写开卡证件号码,否则会导致银行卡身份验证失败!",onfocus:"请正确填写开卡证件号码,否则会导致银行卡身份验证失败!",oncorrect:""}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"请输入开卡证件号码!"},onerror:"请输入开卡证件号码!"}).functionValidator({ onshow:"证件号码格式错误", fun: validateIdentify }) jQuery("#allinpay_fast_bocidentifyform_identityno").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_mobile").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_mobile",onshow:"",onfocus:"",oncorrect:""}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"请输入手机号码!"},onerror:"请输入手机号码!"}).regexValidator({regexp:"^((13|14|15|18|17|16|19)\\d{9})$",onerror:"手机号码不合规范,请重新输入!"}) jQuery("#allinpay_fast_bocidentifyform_mobile").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_telephonehead").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_telephonehead",onshow:"",onfocus:"",oncorrect:""}).functionValidator({ fun : function(val,em) { if(typeof(verifyTel_allinpay_fast_boc)!='undefined' && jQuery.isFunction(verifyTel_allinpay_fast_boc)) { return verifyTel_allinpay_fast_boc(val,em); } return true;} }) jQuery("#allinpay_fast_bocidentifyform_telephonehead").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_telephonefoot").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_telephonefoot",onshow:"",onfocus:"",oncorrect:""}).functionValidator({ fun : function(val,em) { if(typeof(verifyTel_allinpay_fast_boc)!='undefined' && jQuery.isFunction(verifyTel_allinpay_fast_boc)) { return verifyTel_allinpay_fast_boc(val,em); } return true;} }) jQuery("#allinpay_fast_bocidentifyform_telephonefoot").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_telephoneext").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_telephoneext",onshow:"",onfocus:"",oncorrect:""}).functionValidator({ fun : function(val,em) { if(typeof(verifyTel_allinpay_fast_boc)!='undefined' && jQuery.isFunction(verifyTel_allinpay_fast_boc)) { return verifyTel_allinpay_fast_boc(val,em); } return true;} }) jQuery("#allinpay_fast_bocidentifyform_telephoneext").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); jQuery("#allinpay_fast_bocidentifyform_authcode").formValidator({validatorgroup : "allinpay_fast_bocidentifyform",tipid:"tip_allinpay_fast_bocidentifyform_authcode",onshow:"",onfocus:"",oncorrect:""}).inputValidator({min:1,empty:{leftempty:false,rightempty:false,emptyerror:"请正确输入!"},onerror:"请正确输入!"}).regexValidator({regexp:"^\[0-9]{4}$",onerror:""}) jQuery("#allinpay_fast_bocidentifyform_authcode").keyup(function(){var str=this.value;var result="";var flag=false;for (var i = 0; i < str.length; i++){ if (str.charCodeAt(i)==12288){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-12256); continue; } if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375){ flag = true; result+= String.fromCharCode(str.charCodeAt(i)-65248); }else{ result+= String.fromCharCode(str.charCodeAt(i)); }}if(flag) {this.value=result;}}); function validateIdentify(val,elem) { var identitytype = $("#allinpay_fast_bocidentifyform_identitytype").val();var identityno = $("#allinpay_fast_bocidentifyform_identityno").val();try{identityno = Trim(identityno)}catch(error){}if(identitytype == "0") { reg = /^(\d{15}|\d{18}|\d{17}[A-Z]{1})$/; if(!reg.test(identityno)) return "身份证号码不合规范,请重新输入!"; var result = isCardID(identityno) == true ? true : false; if(!result) return "身份证号码不合规范,请重新输入!"; } else if(identitytype == "2") { reg = /^([\u4e00-\u9fa5\w\d\-]{4,})$/; if(!reg.test(identityno)) return "军官证号码不合规范,请重新输入!";} else if(identitytype == "3") { reg = /^([\u4e00-\u9fa5\w\d\-]{3,})$/; if(!reg.test(identityno)) return "士兵证号码不合规范,请重新输入!";} else if(identitytype == "7") { reg = /^(.+)$/; if(!reg.test(identityno)) return "证件号码不合规范,请重新输入!";} else if(identitytype == "8") { reg = /^([\u4e00-\u9fa5\w\d\-]{3,})$/; if(!reg.test(identityno)) return "文职证号码不合规范,请重新输入!";} else if(identitytype == "9") { reg = /^([\u4e00-\u9fa5\w\d\-]{3,})$/; if(!reg.test(identityno)) return "警官证号码不合规范,请重新输入!";} else if(identitytype == "C") { reg = /^(81|82|83)(\d{16}|\d{15}[a-zA-Z]{1})$/; if(!reg.test(identityno)) return "港澳台居民居住证号码不合规范,请重新输入!";} return true;}; $("#allinpay_fast_bocidentifyform_identitytype").change(function () { getTriggerEvent();}); $("#allinpay_fast_bocidentifyform_identityno").focus(function () { getTriggerEvent();}); function getTriggerEvent() { if($("#allinpay_fast_bocidentifyform_identitytype").val() == "0") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "2") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "3") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "4") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "6") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "7") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "8") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "9") { $("#tip_allinpay_fast_bocidentifyform_identityno").html("请正确填写开卡证件号码,否则会导致银行卡身份验证失败!").removeClass().addClass("onFocus"); } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "A") { } else if($("#allinpay_fast_bocidentifyform_identitytype").val() == "B") { } else { $("#tip_allinpay_fast_bocidentifyform_identityno").html("系统不支持的证件类型").removeClass().addClass("onFocus"); }; } });