-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript.js
More file actions
32 lines (30 loc) · 931 Bytes
/
javascript.js
File metadata and controls
32 lines (30 loc) · 931 Bytes
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
/* Developed By Harshit Verma, Roll No. 2055991518 */
function validate(){
var fname = document.getElementById("fname").value;
var lname = document.getElementById("lname").value;
var email = document.getElementById("email").value;
var country = document.getElementById("country").value;
var attendee = document.getElementById("attendee").value;
if(fname.length < 5){
alert("Please Enter a valid First Name.");
return false;
}
if(lname.length < 5){
alert("Please Enter a valid Last Name.");
return false;
}
if(email.indexOf("@") == -1 || email.length < 6){
alert("Please Enter valid Email.");
return false;
}
if(country == "Select"){
alert("Please Select a valid Country.");
return false;
}
if(attendee == "Select"){
alert("Please Select How you want to Attend CES 2021.");
return false;
}
alert("Thank-You for registering for CES 2021.");
return true;
}