Skip to content

Commit 61df7d8

Browse files
authored
Add pattern validation to name input field
Updated the name input field to enforce a pattern that disallows only spaces.
1 parent 2c6f68f commit 61df7d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Form-Controls/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1>Product Pick</h1>
1717
<!-- Customer's name -->
1818
<div>
1919
<label for="name">Full Name:</label><br>
20-
<input type="text" id="name" name="name" required minlength="2" autocomplete="name"><br>
20+
<input type="text" id="name" name="name" pattern=".*\S.*" title="Name can not contain only spaces" required><br>
2121
</div>
2222

2323
<!-- Email -->

0 commit comments

Comments
 (0)