Skip to content

Commit cdafa4c

Browse files
authored
change pattern=" " requirements in the name field
Updated input fields for name and radio buttons for color and size to remove unnecessary 'required' attributes.
1 parent f4aa852 commit cdafa4c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Form-Controls/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1>Product Pick</h1>
1818
<legend>Name and Email address</legend>
1919
<!--Adding <legend> element for accessibility purposes-->
2020
<label for="name">Name</label>
21-
<input type="text" id="name" name="name" minlength="2" pattern="[a-zA-ZÀ-ž]+" required><br><br>
21+
<input type="text" id="name" name="name" minlength="2" pattern="(?:.*\S){2,}.*" required><br><br>
2222
<!--Input field for name, making it required-->
2323
<label for="email">Email:</label>
2424
<input type="email" id="email" required><br><!--Input field for email address. Making it required-->
@@ -31,10 +31,10 @@ <h1>Product Pick</h1>
3131
<input type="radio" name="colour" required>Blue
3232
</label>
3333
<label>
34-
<input type="radio" name="colour" required>Red
34+
<input type="radio" name="colour">Red
3535
</label>
3636
<label>
37-
<input type="radio" name="colour" required>Green
37+
<input type="radio" name="colour">Green
3838
</label><!--Making radio buttons for Blue, Red and Green and making the require fields-->
3939
</fieldset><br>
4040
<fieldset>
@@ -44,19 +44,19 @@ <h1>Product Pick</h1>
4444
<input type="radio" name="size" required>XS
4545
</label>
4646
<label>
47-
<input type="radio" name="size" required>S
47+
<input type="radio" name="size" >S
4848
</label>
4949
<label>
50-
<input type="radio" name="size" required>M
50+
<input type="radio" name="size">M
5151
</label>
5252
<label>
53-
<input type="radio" name="size" required>L
53+
<input type="radio" name="size">L
5454
</label>
5555
<label>
56-
<input type="radio" name="size" required>XL
56+
<input type="radio" name="size">XL
5757
</label>
5858
<label>
59-
<input type="radio" name="size" required>XXL
59+
<input type="radio" name="size">XXL
6060
</label>
6161
</fieldset><br>
6262
<div>

0 commit comments

Comments
 (0)