-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
38 lines (38 loc) · 1.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function validation(){
if(document.FormFill.Username.value==""){
document.getElementById("result").innerHTML="Enter Username";
return false;
}
else if(document.FormFill.Username.value<6){
document.getElementById("result").innerHTML="Atleast 6-char.";
return false;
}
else if(document.FormFill.Email.value==""){
document.getElementById("result").innerHTML="Enter Your Email*";
return false;
}
else if(document.FormFill.Password.value==""){
document.getElementById("result").innerHTML="Enter Your Password*";
return false;
}
else if(document.FormFill.Password.value.length<6){
document.getElementById("result").innerHTML="Password must be 6-digit";
return false;
}
else if(document.FormFill.CPassword.value==""){
document.getElementById("result").innerHTML="Enter Confirm Password";
return false;
}
else if(document.FormFill.Password.value !== document.FormFill.CPassword.value){
document.getElementById("result").innerHTML="Password didn't matched";
return false;
}
else if(document.FormFill.Password.value == document.FormFill.CPassword.value){
popup.classList.add("open-slide");
return false;
}
}
var popup=document.getElementById('popup');
function CloseSlide(){
popup.classList.remove("open-slide");
}