五、判断银行卡号的正则

  1. BPM.blockUI({ target: $("#blockAddDiv"), boxed: true, message: FeekongLan.label.loadmsg });//增加锁定  
  2.                        var pattern = /^([1-9]{1})(\d{14}|\d{18})$/,  
  3.                     str = $("#CardCode").val().replace(/\s+/g, "");  
  4.                        if (!pattern.test(str)) {  
  5.                            var msgModel = { MsgType: "warning", msg: "请正确输入银行卡号!", result: false, msgTitle: "系统提示" };  
  6.                            BPM.ShowMsg(msgModel);  
  7.                            $("#CardCode").focus();  
  8.                            BPM.unblockUI($("#blockAddDiv")); //解除锁定  
  9.                            return false;  
  10.                        }  

转载于:https://www.cnblogs.com/deng-jie/p/9104228.html

你可能感兴趣的:(五、判断银行卡号的正则)