var regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/; if (!regIdCard.test(wxb.that.data.idcard)){ wx.showToast({ image: '/img/kulian.png', title: '請輸入正確的身份證號', }) return false }