Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
train-admin-h5
Overview
Overview
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
tangjiale
train-admin-h5
Commits
36939150
Commit
36939150
authored
Jul 05, 2022
by
tangjiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手机号校验
parent
40ce4791
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
add-student.vue
pages/components/add-student.vue
+18
-2
No files found.
pages/components/add-student.vue
View file @
36939150
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @eMail: 932055106@qq.com
* @eMail: 932055106@qq.com
* @Date: 2022-06-02 15:02:39
* @Date: 2022-06-02 15:02:39
* @LastEditors: tangjiale
* @LastEditors: tangjiale
* @LastEditTime: 2022-0
6-28 11:43:26
* @LastEditTime: 2022-0
7-05 09:51:59
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -111,6 +111,19 @@ export default {
...
@@ -111,6 +111,19 @@ export default {
this
.
$message
.
error
(
'至少输入一个手机号'
)
this
.
$message
.
error
(
'至少输入一个手机号'
)
return
return
}
}
if
(
that
.
param
.
fatherPhone
.
length
&&
!
that
.
isTel
(
that
.
param
.
fatherPhone
)){
this
.
$message
.
error
(
'请输入正确手机号'
)
return
}
if
(
that
.
param
.
motherPhone
.
length
&&
!
that
.
isTel
(
that
.
param
.
motherPhone
)){
this
.
$message
.
error
(
'请输入正确手机号'
)
return
}
if
(
that
.
param
.
otherPhone
.
length
&&
!
that
.
isTel
(
that
.
param
.
otherPhone
)){
this
.
$message
.
error
(
'请输入正确手机号'
)
return
}
if
(
that
.
param
.
schIds
&&
that
.
param
.
schIds
.
length
){
if
(
that
.
param
.
schIds
&&
that
.
param
.
schIds
.
length
){
that
.
param
.
schIds
=
that
.
param
.
schIds
.
join
(
','
)
that
.
param
.
schIds
=
that
.
param
.
schIds
.
join
(
','
)
}
}
...
@@ -125,7 +138,10 @@ export default {
...
@@ -125,7 +138,10 @@ export default {
})
})
}
}
})
})
}
},
isTel
(
tel
)
{
return
/^1
[
0-9
]{10}
$/
.
test
(
tel
);
},
}
}
}
}
</
script
>
</
script
>
...
...
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