|
@@ -45,7 +45,7 @@ module.exports = app => {
|
|
|
// 自定义手机校验规则
|
|
|
app.validator.addRule('mobile', (rule, value) => {
|
|
|
try {
|
|
|
- const regPhone = /^1([34578]\d)\d{8}$/;
|
|
|
+ const regPhone = /^1[3456789]\d{9}$/;
|
|
|
const allowEmpty = rule.allowEmpty === true;
|
|
|
if (allowEmpty && value === '') {
|
|
|
return true;
|