fix(系统设置): 修复创建用户时电话号码不支持199段的问题

Closes 818
This commit is contained in:
shiziyuan9527 2020-11-25 11:26:09 +08:00
parent 754f067cdd
commit e43ce4fa0a
3 changed files with 5 additions and 2 deletions

View File

@ -86,6 +86,7 @@
import MsDialogFooter from "../../common/components/MsDialogFooter";
import {getCurrentUser, listenGoBack, removeGoBackListener} from "../../../../common/js/utils";
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
import {PHONE_REGEX} from "@/common/js/regex";
export default {
name: "MsPersonSetting",
@ -115,7 +116,7 @@
phone: [
{
required: false,
pattern: '^1(3|4|5|7|8)\\d{9}$',
pattern: PHONE_REGEX,
message: this.$t('member.mobile_number_format_is_incorrect'),
trigger: 'blur'
}

View File

@ -338,6 +338,7 @@ import {hasRole, listenGoBack, removeGoBackListener} from "@/common/js/utils";
import MsRolesTag from "../../common/components/MsRolesTag";
import {ROLE_ADMIN} from "@/common/js/constants";
import {getCurrentUser} from "../../../../common/js/utils";
import {PHONE_REGEX} from "@/common/js/regex";
export default {
name: "MsUser",
@ -401,7 +402,7 @@ export default {
{required: true, message: this.$t('user.input_phone'), trigger: 'blur'},
{
required: true,
pattern: '^1(3|4|5|7|8)\\d{9}$',
pattern: PHONE_REGEX,
message: this.$t('user.mobile_number_format_is_incorrect'),
trigger: 'blur'
}

View File

@ -0,0 +1 @@
export const PHONE_REGEX = '^1(3|4|5|7|8|9)\\d{9}$';