I know this may be very simple but I couldn't find anything relevant. I am using the HTML element for accepting the password from the user.
There is a condition for the password to be accepted
-
It should only contain letters between a to h (0 times or more)
-
It should only contain numbers between 1 to 8 (0 times or more)
Following the above two conditions the user can come up with any password combination. For example: abc123, 6ad27, hefb etc etc which should be accepted by the input element.
But it should not accept patterns like z00911, ksoql234 etc.
What should be the value for pattern attribute in the following code snippet for checking the above two conditions?
<input type="password" pattern="WHAT-SHOULD-I-PUT-HERE">
I hope someone might help. Thank you
Aucun commentaire:
Enregistrer un commentaire