-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform-validation.html
More file actions
91 lines (91 loc) · 3.73 KB
/
form-validation.html
File metadata and controls
91 lines (91 loc) · 3.73 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Validation</title>
<style>
label{
display: inline-block;
min-width:140px;
margin-bottom: 20px;
}
input ,select{
border: 2px solid black;
}
.submit{
margin-left: 80px;
margin-top: 40px;
padding: 10px;
}
.error{
border: 3px solid red;
}
.error-corrected{
border: 3px solid green;
}
</style>
</head>
<body>
<div class="container">
<form action="" id="create-account">
<h1>Create a New Account</h1>
<div>
<label for="f-name">First name : </label><input type="text" name="fname" id="f-name" placeholder="Enter your First name " >
</div>
<div>
<label for="m-name">Middle name : </label><input type="text" name="mname" id="m-name" placeholder="Enter your Middle name " >
</div>
<div>
<label for="l-name">Last name : </label><input type="text" name="lname" id="l-name" placeholder="Enter your Last name ">
</div>
<div>
<label for="l-name" >Gender : </label>
<input type="radio" name="gender" id="male"><label for="male" >Male</label>
<input type="radio" name="gender" id="female"><label for="female">Female</label>
</div>
<div>
<label for="dob">Date of Birth : </label><input type="date" name="dob" id="dob" max="2000-12-31">
</div>
<div>
<label for="e-mail">Mail ID : </label><input type="email" name="email" id="e-mail" onblur="check_email()" placeholder="Enter your Mail ID " >
</div>
<div>
<label for="pwd">Password : </label><input type="password" name="password" id="pwd" onblur="check_pwd()" placeholder="Enter your Password" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" >
</div>
<div>
<label for="c-pwd">Confirm Password : </label><input type="password" name="cpassword" id="c-pwd" placeholder="Confirm your Password "> <input type="checkbox" onclick="show_pwd()" name="" id="">Show Password
</div>
<div>
<label for="ph-num">Phone Number : </label>
<select name="country_code" id="country-code">
<option value="ind-91">IND +91</option>
<option value="aus-61">AUS +61</option>
<option value="usa-1">USA +1</option>
<option value="tur-90">TUR +90</option>
</select>
<!--
IND - 10 digits
AUS - 09 digits
USA - 10 digits
TUR - 11 digits -->
<input type="text" name="phnum" id="ph-num" placeholder="Enter your Phone Number " >
</div>
<div>
<label for="country">Country : </label>
<select name="country" id="">
<option value="ind">IND</option>
<option value="pak">PAK</option>
<option value="us">US</option>
<option value="rus">RUS</option>
</select>
</div>
<div>
<input type="button" value="submit" class="submit">
</div>
</form>
</div>
<script src="form-validation.js"></script>
</body>
</html>