-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.html
More file actions
63 lines (61 loc) · 2.45 KB
/
form.html
File metadata and controls
63 lines (61 loc) · 2.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h2>Sign Up</h2>
<form id="signupForm">
<div class="form-control">
<label for="firstName">First Name:</label>
<input type="text" id="firstName" name="firstName" required>
</div>
<div class="form-control">
<label for="lastName">Last Name:</label>
<input type="text" id="lastName" name="lastName" required>
</div>
<div class="form-control">
<label for="mobileNumber">Mobile Number:</label>
<input type="tel" id="mobileNumber" name="mobileNumber" pattern="[0-9]{10}" required>
</div>
<div class="form-control">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-control">
<label for="gender">Gender:</label>
<input type="radio" id="male" name="gender" value="male" required>
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="female" required>
<label for="female">Female</label>
</div>
<div class="form-control">
<label for="nationality">Nationality:</label>
<select id="nationality" name="nationality" required>
<option value="" disabled selected>Select Nationality</option>
<option value="in">India</option>
<option value="us">US</option>
<option value="uk">UK</option>
<option value="ca">Canada</option>
</select>
</div>
<div class="form-control">
<label for="password">Password:</label>
<input type="password" id="password" name="password" pattern="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,}$" required>
<small>Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one digit, and one special character.</small>
</div>
<div class="form-control">
<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob" required>
</div>
<button type="submit">Sign Up</button>
</form>
<p id="error-msg" class="error-message"></p>
</div>
<script src="script.js"></script>
</body>
</html>