判断银行卡号的正则

 

 
  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 @ 2020-09-18 10:46  威武的大萝卜  阅读(725)  评论(0编辑  收藏  举报