五、判断银行卡号的正则

  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.                        }  
posted @ 2018-05-29 11:41  杰_森  阅读(19341)  评论(1编辑  收藏  举报