Skip to content

Commit 1394834

Browse files
committed
add fieldset and change name requirement
1 parent c70acaf commit 1394834

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Form-Controls/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ <h1>T-shirt order form</h1>
2424
// 4-allow customer to choose one size from defined six size
2525
2626
<form action="" method="POST">
27+
<fieldset>
28+
<legend >customer information</legend>
2729
<h1>T-Shirt Order Form</h1>
2830
2931
<!--Customer's Name -->
3032
<label for="name">What is your name?</label>
31-
<input type="text" id="name" name="name" required minlength="2" placeholder="Enter your full name">
33+
<input type="text" id="name" name="name" required minlength="2" pattern="[A-Za-z\s]{2,}" title="Please enter a valid name with at least 2 characters, containing only letters and spaces."> placeholder="Enter your full name">
3234

3335
<!-- Customer's Email -->
3436
<label for="email">What is your email?</label>
@@ -54,7 +56,7 @@ <h1>T-Shirt Order Form</h1>
5456
<option value="XL">XL</option>
5557
<option value="XXL">XXL</option>
5658
</select>
57-
59+
</fieldset>
5860
<!-- Submit Button -->
5961
<button type="submit">Submit Order</button>
6062
</form>

0 commit comments

Comments
 (0)