Skip to content

Commit f2de985

Browse files
committed
feat: fixed pattern attribute error in first and lastname.
1 parent 6064caa commit f2de985

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Form-Controls/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" xmlns:>
33
<head>
44
<meta charset="utf-8"/>
55
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
@@ -37,8 +37,8 @@ <h1>Product Pick</h1>
3737
id="firstname"
3838
name="firstname"
3939
required
40-
pattern="^[A-Za-z\s'-]{2,}$"
41-
title="first name must be more than 2 characters">
40+
pattern="[A-Za-z]+(?:['\-][A-Za-z]+)*"
41+
title="enter a valid name">
4242
</div>
4343

4444
<div class="form-group">
@@ -48,8 +48,8 @@ <h1>Product Pick</h1>
4848
id="lastname"
4949
name="lastname"
5050
required
51-
pattern="^[A-Za-z\s'-]{2,}$"
52-
title="last name must be more than 2 characters">
51+
pattern="[A-Za-z]+(?:['\-][A-Za-z]+)*"
52+
title="enter a valid name">
5353
</div>
5454

5555
<div class="form-group">

0 commit comments

Comments
 (0)