+ 1
What patterns does in Html?
Pattern is a type of input restriction. I was not able to understand what it does.
3 Respuestas
+ 2
you may ask user to input his/her phone number
in this case you may want them to enter with the pattern you have given like (212) 999 99 99 instead of 2129999999
or best to check user enters a correct email andreas
E-mail: <input type="email" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}quot;>
+ 2
The pattern attribute contains a regular expression. It specifies how exactly should the input content be. Including but not limited to : the length of the input entry, wethere it needs to contain uppercases, whether it should start with a specific word, whether it can contain special characters...and many other possibilities. Basically, this is used to take a thorough control over the recived input entry. a simple pattern looks like this :
[a-zA-Z0-9]
This expression disallows the use of special characters like underscores etc.
0
Here is the example to use pattern only to validate password.
https://code.sololearn.com/WwnmYKtR4Y3D/?ref=app