admin 管理员组

文章数量: 887006

正则表达式验证银行卡号

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


银行卡首位非0,位数也不同

本文标签: 正则表达式验证银行卡号