Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
aa4ad5b5
Commit
aa4ad5b5
authored
Jul 12, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改用户验证
parent
aaaa4a1e
Pipeline
#55143
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
22 deletions
+28
-22
AddUserModal.jsx
src/pages/userCenter/userManage/AddUserModal.jsx
+14
-11
ChangePasswordModal.jsx
src/pages/userCenter/userManage/ChangePasswordModal.jsx
+4
-4
EditUserModal.jsx
src/pages/userCenter/userManage/EditUserModal.jsx
+10
-7
No files found.
src/pages/userCenter/userManage/AddUserModal.jsx
View file @
aa4ad5b5
...
...
@@ -124,26 +124,26 @@ const AddUserModal = props => {
rules=
{
[
{
pattern
:
/^
[
a-zA-Z0-9_
]
{0,}$/
,
message
:
'
不支持中文和特殊字符
'
,
message
:
'
长度小于16位,支持字母与数字,允许下划线
'
,
},
{
required
:
true
},
]
}
>
<
Input
placeholder=
"
登录名称不支持中文与特殊字符"
maxLength=
"20
"
/>
<
Input
placeholder=
"
请输入登录名称(小于16位)"
maxLength=
"16
"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
name=
"password"
label=
"账
户
密码"
label=
"账
号
密码"
rules=
{
[
{
pattern
:
/^
(?=
.*
[
a-zA-Z
\d])(?=
.*
([
a-zA-Z
]
.*
))(?=
.*
[
0-9
]
.*
)[
!-~
]
{6,16}$/
,
message
:
'
密码长度6-16位,且必须包含数字和字母,不能存在空格
'
,
pattern
:
/^
[
a-zA-Z0-9_
]
{6,16}$/
,
message
:
'
长度6-16位,支持字母与数字,允许下划线
'
,
},
{
required
:
true
},
]
}
>
<
Input
placeholder=
"请输入账
户密码,至少6位
"
maxlength=
"16"
/>
<
Input
placeholder=
"请输入账
号密码(6~16位)
"
maxlength=
"16"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -151,10 +151,13 @@ const AddUserModal = props => {
label=
"用户姓名"
rules=
{
[
{
required
:
true
},
{
pattern
:
/^
[
A-Za-z0-9
\u
4e00-
\u
9fa5
]
+$/
,
message
:
'不支持特殊字符'
},
{
pattern
:
/^
[
A-Za-z0-9_
\u
4e00-
\u
9fa5
]
+$/
,
message
:
'长度小于16位,支持字母、中文与数字,允许下划线'
,
},
]
}
>
<
Input
placeholder=
"
用户姓名不支持特殊字符"
maxLength=
"20
"
/>
<
Input
placeholder=
"
请输入用户姓名(小于16位)"
maxLength=
"16
"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -164,11 +167,11 @@ const AddUserModal = props => {
{
required
:
true
},
{
pattern
:
new
RegExp
(
/^1
[
0-9
]
{10}$/
),
message
:
'
手机号码以1开头11位
'
,
message
:
'
请输入正确的手机号码!
'
,
},
]
}
>
<
Input
placeholder=
"请输入
11位
手机号码"
maxlength=
"11"
autoComplete=
"off"
/>
<
Input
placeholder=
"请输入手机号码"
maxlength=
"11"
autoComplete=
"off"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -177,7 +180,7 @@ const AddUserModal = props => {
rules=
{
[
{
type
:
'email'
,
message
:
'请输入正确的电子邮箱
!
'
,
message
:
'请输入正确的电子邮箱
!
'
,
},
]
}
>
...
...
src/pages/userCenter/userManage/ChangePasswordModal.jsx
View file @
aa4ad5b5
...
...
@@ -119,8 +119,8 @@ const ChangePasswordModal = props => {
label=
"新密码"
rules=
{
[
{
pattern
:
/^
(?=
.*
[
a-zA-Z
\d])(?=
.*
([
a-zA-Z
]
.*
))(?=
.*
[
0-9
]
.*
)[
!-~
]
{6,16}$/
,
message
:
'
密码长度6-16位,且必须包含数字和字母,不能存在空格
'
,
pattern
:
/^
[
a-zA-Z0-9_
]
{6,16}$/
,
message
:
'
长度6-16位,支持字母与数字,允许下划线
'
,
},
{
required
:
true
},
]
}
...
...
@@ -132,8 +132,8 @@ const ChangePasswordModal = props => {
label=
"确认密码"
rules=
{
[
{
pattern
:
/^
(?=
.*
[
a-zA-Z
\d])(?=
.*
([
a-zA-Z
]
.*
))(?=
.*
[
0-9
]
.*
)[
!-~
]
{6,16}$/
,
message
:
'
密码长度6-16位,且必须包含数字和字母,不能存在空格
'
,
pattern
:
/^
[
a-zA-Z0-9_
]
{6,16}$/
,
message
:
'
长度6-16位,支持字母与数字,允许下划线
'
,
},
{
required
:
true
},
]
}
...
...
src/pages/userCenter/userManage/EditUserModal.jsx
View file @
aa4ad5b5
...
...
@@ -133,12 +133,12 @@ const EditUserModal = props => {
rules=
{
[
{
pattern
:
/^
[
a-zA-Z0-9_
]
{0,}$/
,
message
:
'
不支持中文和特殊字符
'
,
message
:
'
长度小于16位,支持字母与数字,允许下划线
'
,
},
{
required
:
true
},
]
}
>
<
Input
placeholder=
"
登录名称不支持中文与特殊字符"
maxLength=
"20
"
/>
<
Input
placeholder=
"
请输入登录名称(小于16位)"
maxLength=
"16
"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -146,10 +146,13 @@ const EditUserModal = props => {
label=
"用户姓名"
rules=
{
[
{
required
:
true
},
{
pattern
:
/^
[
A-Za-z0-9
\u
4e00-
\u
9fa5
]
+$/
,
message
:
'不支持特殊字符'
},
{
pattern
:
/^
[
A-Za-z0-9_
\u
4e00-
\u
9fa5
]
+$/
,
message
:
'长度小于16位,支持字母、中文与数字,允许下划线'
,
},
]
}
>
<
Input
placeholder=
"
用户姓名不支持特殊字符"
maxLength=
"20
"
/>
<
Input
placeholder=
"
请输入用户姓名(小于16位)"
maxLength=
"16
"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -159,11 +162,11 @@ const EditUserModal = props => {
{
required
:
true
},
{
pattern
:
new
RegExp
(
/^1
[
0-9
]
{10}$/
),
message
:
'
手机号码以1开头11位
'
,
message
:
'
请输入正确的手机号码!
'
,
},
]
}
>
<
Input
placeholder=
"请输入
11位
手机号码"
autoComplete=
"off"
maxlength=
"11"
/>
<
Input
placeholder=
"请输入手机号码"
autoComplete=
"off"
maxlength=
"11"
/>
</
Form
.
Item
>
<
Form
.
Item
hasFeedback
...
...
@@ -172,7 +175,7 @@ const EditUserModal = props => {
rules=
{
[
{
type
:
'email'
,
message
:
'请输入正确的电子邮箱
!
'
,
message
:
'请输入正确的电子邮箱
!
'
,
},
]
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment