Skip to content

Commit 663ddbb

Browse files
committed
changed the patter of the name form the mach the requirements
1 parent 1ee1f53 commit 663ddbb

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

Form-Controls/index.html

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
@@ -7,23 +7,30 @@
77
<meta name="description" content="" />
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
99
</head>
10-
10+
1111
<body>
1212
<header>
1313
<h1>Product Pick</h1>
1414
</header>
1515
<main>
1616
<form>
1717
<div>
18-
<label for="name">Name(only letters, spaces and symbols are allowed)</label>
19-
<input type="text" name="name" id="name" required minlength="2" pattern="[A-Za-z\s\W_]+">
18+
<label for="name">Name</label>
19+
<input
20+
type="text"
21+
name="name"
22+
id="name"
23+
required
24+
pattern=".*\S.*\S.*"
25+
title="at least two(2) characters with no spaces."
26+
/>
2027
</div>
21-
<br>
22-
<div>
28+
<br />
29+
<div>
2330
<label for="email">E-mail</label>
24-
<input type="email" name="email" id="email" required pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}">
31+
<input type="email" name="email" id="email" required />
2532
</div>
26-
<br>
33+
<br />
2734
<div>
2835
<label for="colour">select colour</label>
2936
<select name="colour" id="colour" required>
@@ -33,7 +40,7 @@ <h1>Product Pick</h1>
3340
<option value="green">green</option>
3441
</select>
3542
</div>
36-
<br>
43+
<br />
3744
<div>
3845
<label for="size"> select size</label>
3946
<select name="size" id="size" required>
@@ -44,13 +51,13 @@ <h1>Product Pick</h1>
4451
<option value="l">L(large)</option>
4552
<option value="xl">XL(extra large)</option>
4653
<option value="xxl">XXL(double extra large)</option>
47-
</select>
54+
</select>
4855
</div>
49-
<br>
56+
<br />
5057
<button type="submit">Submit</button>
5158
</form>
5259
</main>
53-
60+
5461
<footer>
5562
<p>By Boualem Larbi Djebbour</p>
5663
</footer>

0 commit comments

Comments
 (0)