正则
This commit is contained in:
@@ -464,11 +464,11 @@ export default {
|
||||
return this.$toast('请输入身份证号')
|
||||
}
|
||||
|
||||
if(this.form.idNumber) {
|
||||
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
||||
if (!reg.test(this.form.idNumber)) {
|
||||
if(this.form.idNumber.length) {
|
||||
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)) {
|
||||
return this.$toast('请输入正确的身份证账号')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.form.name) {
|
||||
|
||||
Reference in New Issue
Block a user