Skip to content

Commit 324e7f9

Browse files
Validation
Added submit button, validate the input fields
1 parent aa6a09a commit 324e7f9

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

Form-Controls/index.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ <h1>Product Pick</h1>
1515
<form>
1616
<div>
1717
<label>Customer Name: </label>
18-
<input>
19-
</div>
18+
<input required minlength="2" pattern=".*\S.*\S.*">
19+
</div><br>
2020
<div>
2121
<label>Customer Email: </label>
22-
<input type="email">
22+
<input type="email" required placeholder="you@example.com">
2323
</div>
2424
<div>
2525
<p>Choose a T‑shirt colour:</p>
@@ -51,16 +51,13 @@ <h1>Product Pick</h1>
5151
<option value="XL">XL</option>
5252
<option value="XXL">XXL</option>
5353
</select>
54-
</div>
54+
</div> <br>
55+
<button type="submit">Submit</button>
5556

56-
<!--
57-
try writing out the requirements first as comments
58-
this will also help you fill in your PR message later-->
5957
</form>
6058
</main>
6159
<footer>
62-
<!-- change to your name-->
63-
<p>By HOMEWORK SOLUTION</p>
60+
<p>By LAVANYA</p>
6461
</footer>
6562
</body>
6663
</html>

0 commit comments

Comments
 (0)