File tree Expand file tree Collapse file tree 1 file changed +41
-16
lines changed
Expand file tree Collapse file tree 1 file changed +41
-16
lines changed Original file line number Diff line number Diff line change 1- <!DOCTYPE html>
1+ <!doctype html>
22< html lang ="en ">
3- < head >
4- < title > HTML Form Validation</ title >
5- </ head >
6- < body >
7- < h1 > HTML Form Validation</ h1 >
8- < form >
9- < label for ="name "> Name: </ label > < input type ="text " name ="name " minlength ="2 " required > < br >
10- < label for ="date "> Date: </ label > < input type ="text " name ="date " pattern ="\d{2}/\d{2}/\d{4} " required > < br >
11- < label for ="email "> Email: </ label > < input type ="text " name ="email " pattern ="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ " required > < br >
12- < label for ="website "> Website: </ label > < input type ="text " name ="website " pattern ="(https?://)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}(\/[^\s]*)? " required > < br >
13- < label for ="phone "> Phone Number: </ label > < input type ="text " name ="phone " pattern ="\d{3}-?\d{3}-?\d{4} " required > < br >
14- < button type ="submit "> Submit</ button >
15- </ form >
16- </ body >
17- </ html >
3+ < head >
4+ < title > HTML Form Validation</ title >
5+ </ head >
6+ < body >
7+ < h1 > HTML Form Validation</ h1 >
8+ < form >
9+ < label for ="name "> Name: </ label
10+ > < input type ="text " name ="name " minlength ="2 " required /> < br />
11+ < label for ="date "> Date: </ label
12+ > < input
13+ type ="text "
14+ name ="date "
15+ pattern ="\d{2}/\d{2}/\d{4} "
16+ required
17+ /> < br />
18+ < label for ="email "> Email: </ label
19+ > < input
20+ type ="text "
21+ name ="email "
22+ pattern ="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ "
23+ required
24+ /> < br />
25+ < label for ="website "> Website: </ label
26+ > < input
27+ type ="text "
28+ name ="website "
29+ pattern ="(https?://)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}(\/[^\s]*)? "
30+ required
31+ /> < br />
32+ < label for ="phone "> Phone Number: </ label
33+ > < input
34+ type ="text "
35+ name ="phone "
36+ pattern ="\d{3}-?\d{3}-?\d{4} "
37+ required
38+ /> < br />
39+ < button type ="submit "> Submit</ button >
40+ </ form >
41+ </ body >
42+ </ html >
You can’t perform that action at this time.
0 commit comments