-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (41 loc) · 1.64 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Validation</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="container">
<form>
<i class="fas fa-paper-plane"></i>
<div class="input-group">
<label>Full Name</label>
<input type="text" placeholder="Enter your name" id="contact-name" onkeyup="validateName()">
<span id="name-error"></span>
</div>
<div class="input-group">
<label>Phone Number</label>
<input type="tel" placeholder="123 456 7890" id="contact-phone" onkeyup="validatePhone()">
<span id="phone-error"></span>
</div>
<div class="input-group">
<label>Email Id</label>
<input type="email" placeholder="Enter Email" id="contact-email" onkeyup="validateEmail()">
<span id="email-error"></span>
</div>
<div class="input-group">
<label>Your Message</label>
<textarea rows="5" placeholder="Enter your message" id="contact-message" onkeyup="validateMessage()"></textarea>
<span id="message-error"></span>
</div>
<button onclick="return validateForm()">Submit</button>
<span id="submit-error"></span>
</form>
</div>
<script src="script.js"></script>
</body>
</html>