身份证号校验

app
wangxia 5 months ago
parent 19ff402826
commit 6df5112dc5

@ -27,7 +27,7 @@
placeholder: '请输入身份证号',
type: 'slot',
pColumn: 8,
require: true,
require: false,
},
{
icon: '',
@ -38,7 +38,7 @@
tip: 'slot-sex',
type: 'slot',
pColumn: 12,
require: true,
require: false,
customRequire: true,
},
{
@ -51,7 +51,7 @@
placeholder: '请输入年龄',
type: 'slot',
pColumn: 8,
require: true,
require: false,
},
{
icon: '',
@ -118,7 +118,7 @@
placeholder: '请输入联系电话',
type: 'slot',
pColumn: 8,
require: true,
require: false,
},
]" @changeMobile="handleClickMobile"></g-panel-form-slot>
<g-panel-fixed>
@ -376,40 +376,26 @@ export default {
})
return false
}
if (!that.info.sex) {
if (!that.info.tel && !that.info.weChat) {
uni.showToast({
icon: 'none',
title: '请选择性别',
title: '请输入手机号或微信',
})
return false
}
if (!that.info.age) {
uni.showToast({
icon: 'none',
title: '请输入年龄',
})
return false
}
if (!that.info.nation) {
uni.showToast({
icon: 'none',
title: '请选择民族',
})
return false
}
if (!that.G.setReg(that.info.tel, 'tel')) {
if (that.info.tel &&!that.G.setReg(that.info.tel, 'tel')) {
uni.showToast({
icon: 'none',
title: '请输入正确的手机号',
})
return false
}
if (!that.G.setReg(that.info.idCard, 'idcard')) {
if (that.info.idCard && !that.G.isValidIdCard(that.info.idCard)) {
uni.showToast({
icon: 'none',
title: '请输入正确的身份证号',
})
return false
icon: "none",
title: "请输入正确的身份证号",
});
return false;
}
console.log(that.info)
if (that.imgList.length > 0) {

Loading…
Cancel
Save