Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
MinsoftK
2020-04-23 20:56:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
44c8e6d9dd2534820f748c4213be2be62c42fb0d
44c8e6d9
1 parent
b4e0ee1f
modfify validation email and passwords function.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
50 deletions
front/web/signinmain.html
front/web/validation.js
front/web/signinmain.html
View file @
44c8e6d
...
...
@@ -24,7 +24,7 @@
<div
id=
"article"
>
<h2>
회원가입
</h2>
<div
id=
"inputset"
>
<form
class=
"signinform"
action=
"loginmain.html"
>
<form
class=
"signinform"
action=
"loginmain.html"
onsubmit=
"return checkValidation(this)"
>
<label
for=
"email"
>
이메일:
</label><br>
<input
id=
"eValidation"
type=
"text"
name=
"email"
placeholder=
"이메일을 입력하세요."
><br>
...
...
front/web/validation.js
View file @
44c8e6d
var
Email
=
{
checkEmailForm
:
function
(
email
){
checkEmail
:
function
(
self
){
var
email
=
document
.
getElementById
(
'eValidation'
).
value
;
var
regExp
=
/^
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*@
[
0-9a-zA-Z
]([
-_.
]?[
0-9a-zA-Z
])
*.
[
a-zA-Z
]{2,3}
$/i
;
if
(
regExp
.
test
(
email
){
if
(
regExp
.
test
(
email
)
)
{
return
true
;
}
else
return
false
;
}
,
checkEmpty
:
function
(
self
){
var
putEmail
=
document
.
getElementById
(
'eValidation'
).
value
;
if
(
Email
.
checkEmailForm
(
putEmail
)
===
true
){
return
true
;
}
else
{
if
(
Email
.
checkEmailForm
(
putEmail
)
===
NULL
)
alert
(
"Email을 입력하세요."
);
else
alert
(
"Email 형식을 확인해주세요."
);
}
else
if
(
email
===
NULL
){
alert
(
"이메일을 입력해주세요!"
);
return
false
;
}
else
{
alert
(
"이메일 형식을 제대로 입력해주세요!"
);
return
false
;
}
}
}
var
Password
=
{
checkPassword
fs
:
function
(
self
){
checkPassword
:
function
(
self
){
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
if
(
fpassword
===
spassword
){
return
true
;
}
else
return
false
;
}
,
checkEmpty
:
function
(
self
){
var
fpassword
=
document
.
getElementById
(
'fValidation'
).
value
;
var
spassword
=
document
.
getElementById
(
'sValidation'
).
value
;
if
(
fpassword
===
NULL
||
spassword
===
NULL
){
alert
(
"비밀번호를 입력해주세요"
);
}
else
{
return
true
;
}
}
else
if
(
fpassword
===
NULL
||
spassword
===
NULL
){
alert
(
"비밀번호를 입력해주세요!"
);
return
false
;
}
else
{
alert
(
"작성한 비밀번호들이 다릅니다!"
);
return
false
;
}
,
}
function
validationCheck
(
self
)
{
if
(
Password
.
checkPasswordfs
()){
Password
.
checkEmpty
();
}
else
alert
(
"두 비밀번호가 일치하지 않습니다! 다시 입력해주세요!"
);
}
}
function
nightDayHandler
(
self
){
if
(
self
.
value
===
'night'
)
{
Body
.
SetBackGruondColor
(
'black'
)
Body
.
SetColor
(
'white'
)
;
self
.
value
=
'day'
;
function
checkValidation
(
self
){
Email
.
checkmail
();
Password
.
checkPassword
();
if
(
Email
.
checkEmail
()
&&
Password
.
checkPassword
()
){
return
true
;
}
else
return
false
;
Links
.
SetColor
(
'powderblue'
);
}
else
{
Body
.
SetBackGruondColor
(
'white'
)
Body
.
SetColor
(
'black'
);
self
.
value
=
'night'
;
Links
.
SetColor
(
'blue'
);
}
}
}
...
...
Please
register
or
login
to post a comment