身份校验替换
This commit is contained in:
@@ -103,7 +103,7 @@ export default {
|
||||
return this.$toast('请输入上报人身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
|
||||
@@ -335,7 +335,7 @@ export default {
|
||||
return this.$toast('请输入返乡人员身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
return this.$u.toast('请输入身份证号')
|
||||
}
|
||||
if(this.form.idNumber) {
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$u.toast('请输入正确的身份证号')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
return this.$toast('请输入上报人身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
|
||||
@@ -270,7 +270,7 @@ export default {
|
||||
return this.$toast('请输入返乡人员身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
return this.$toast('请输入上报人身份证号')
|
||||
}
|
||||
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
|
||||
if (!/^[1-9]\d{5}(19\d{2}|20[0-2]\d)(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])\d{3}([0-9xX])$/.test(this.form.idNumber)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
if (!this.form.phone) {
|
||||
|
||||
Reference in New Issue
Block a user