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
92907699
Commit
92907699
authored
Aug 02, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户管理表单验证
parent
cdf52348
Pipeline
#32437
skipped with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+1
-5
AddUserModal.jsx
src/pages/userCenter/userManage/AddUserModal.jsx
+16
-4
No files found.
src/pages/dataCenter/dictionary1/WebDic.js
View file @
92907699
...
...
@@ -757,11 +757,7 @@ const WebDic = () => {
<
Form
.
Item
name
=
'nodeName1'
label
=
"名称"
rules
=
{
[
{
required
:
true
,
message
:
'不能为空'
},
]
}
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
>
<
Input
placeholder
=
"请输入名称"
/>
<
/Form.Item
>
...
...
src/pages/userCenter/userManage/AddUserModal.jsx
View file @
92907699
...
...
@@ -38,9 +38,15 @@ const AddUserModal = props => {
}
else
if
(
password
.
length
<
6
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
description
:
'密码至少为6位
,且包含数字和字母
!'
,
});
}
else
if
(
userName
===
''
)
{
}
else
if
(
password
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码不能为空!'
,
});
}
else
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户名称不能为空!'
,
...
...
@@ -117,8 +123,14 @@ const AddUserModal = props => {
label=
"账户密码"
rules=
{
[{
pattern
:
/^
[^\s]
*$/
,
message
:
'不能为空'
},
]
}
message
:
'不能为空'
},
{
pattern
:
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]
{6,}$/
,
message
:
'密码长度必须大于6,且必须包含数字和字母'
}
]
}
>
<
Input
placeholder=
"请输入账户密码,至少6位"
/>
</
Form
.
Item
>
...
...
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