正则
This commit is contained in:
@@ -464,8 +464,8 @@ export default {
|
|||||||
return this.$toast('请输入身份证号')
|
return this.$toast('请输入身份证号')
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.form.idNumber) {
|
if(this.form.idNumber.length) {
|
||||||
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||||
if(!reg.test(this.form.idNumber)) {
|
if(!reg.test(this.form.idNumber)) {
|
||||||
return this.$toast('请输入正确的身份证账号')
|
return this.$toast('请输入正确的身份证账号')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user