Skip to content

Commit

Permalink
fix(系统设置): 修复创建用户时电话号码不支持199段的问题
Browse files Browse the repository at this point in the history
Closes 818
  • Loading branch information
shiziyuan9527 committed Nov 25, 2020
1 parent 754f067 commit e43ce4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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'
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/business/components/settings/system/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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'
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/common/js/regex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const PHONE_REGEX = '^1(3|4|5|7|8|9)\\d{9}$';

0 comments on commit e43ce4f

Please sign in to comment.