Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 71faa1ea
authored
Aug 17, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
验证
1 parent
5c59ce48
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
html/merchant/edit.html
js/validator.js
html/merchant/edit.html
View file @
71faa1e
...
@@ -472,8 +472,8 @@
...
@@ -472,8 +472,8 @@
if
((
merchantType
==
1
)
&&
!
validator
.
checkIdCard
(
value
))
{
if
((
merchantType
==
1
)
&&
!
validator
.
checkIdCard
(
value
))
{
return
'请填入正确的身份证'
return
'请填入正确的身份证'
}
}
if
(
value
&&
!
validator
.
ISNUMANDLETTERS
.
test
(
value
))
{
if
(
value
&&
validator
.
ISCHINESE2
.
test
(
value
))
{
return
'只能输入数字
和字母
'
return
'只能输入数字
、字母和符号
'
}
}
}
}
},
},
...
...
js/validator.js
View file @
71faa1e
...
@@ -16,6 +16,8 @@ layui.define(['store'], function (exports) {
...
@@ -16,6 +16,8 @@ layui.define(['store'], function (exports) {
/* 判断是否为中文 */
/* 判断是否为中文 */
ISCHINESE
:
/^
[\u
0391-
\u
FFE5
]
+$/
,
ISCHINESE
:
/^
[\u
0391-
\u
FFE5
]
+$/
,
ISCHINESE2
:
/
[\u
4E00-
\u
9FA5
]
/
,
/* 判断是否为英文字母 */
/* 判断是否为英文字母 */
ISENGLISH
:
/^
[
a-zA-Z
]
+$/
,
ISENGLISH
:
/^
[
a-zA-Z
]
+$/
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment