Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
刘传洋
9 years ago
Commit
9332c1be5dd824dba5d1bb46f751da3d3ff0e67b
1 parent
d15b0a88
change mobile and email validate
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
web-static/js/home/address.js
web-static/js/order/address.js
web-static/js/order/ensure.js
web-static/js/home/address.js
View file @
9332c1b
...
...
@@ -216,7 +216,7 @@ function blurAction(opt) {
}
if
(
opt
.
inputName
===
'mobile'
)
{
regular
=
/^1
[
3|4|5|8|7
][
0-9
]{9}
$/
;
regular
=
/^
\d{11}
$/
;;
// /^
1[3|4|5|8|7][0-9]{9}$/;
if
(
opt
.
len
!==
11
)
{
msg
=
'手机号码必须是11位的,请确认'
;
...
...
web-static/js/order/address.js
View file @
9332c1b
...
...
@@ -444,9 +444,9 @@ exports.saveAddress = function() {
var
nameReg
=
/^
[\u
4e00-
\u
9fa5
]{2,5}
$/
;
var
addressReg
=
/^
[\s\S]{2,100}
$/
;
var
phoneReg
=
/^
1
[
35847
]{1}[
0-9
]{9
}
$/
;
var
phoneReg
=
/^
\d{11
}
$/
;
var
codeReg
=
/^
[
0-9
]{6}
$/
;
var
emailReg
=
/^
([
a-zA-Z0-9_
\.\-])
+
\@(([
a-zA-Z0-9
\-])
+
\.)
+
([
a-zA-Z0-9
]{2,4})
+$/
;
var
emailReg
=
/^
[^
@
]
+
\@[^
@
]
+$/
;
// /^
([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var
telCodeReg
=
/^
[
0-9
]{3,5}
$/
;
var
telReg
=
/^
[
0-9
]{5,10}
$/
;
...
...
web-static/js/order/ensure.js
View file @
9332c1b
...
...
@@ -916,7 +916,7 @@ function saveReceiptInfo() {
if
(
finalReceiptMobile
===
receiptMobileStar
)
{
finalReceiptMobile
=
receiptMobile
;
}
else
{
verifymobile
=
/
[
1
][
34578
][
0-9
]{9}
/
;
verifymobile
=
/
^
\d{11}
$/
;
// /
[1][34578][0-9]{9}/;
if
(
!
verifymobile
.
test
(
finalReceiptMobile
))
{
$
(
'.invoice-phone .enpty-input'
).
removeClass
(
'hide'
);
if
(
finalReceiptMobile
.
length
===
0
)
{
...
...
Please
register
or
login
to post a comment