How to use the pattern attribute in input tag to allow the username with particular Patterns.Im not getting it.Can anyone do it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

How to use the pattern attribute in input tag to allow the username with particular Patterns.Im not getting it.Can anyone do it?

Just to take input from the user and notifying whether he is allowed r not based on the pattern of user name he is entered. And here the pattern is '% SL'.

13th Nov 2017, 3:27 AM
VARUN KUMAR PADALA
VARUN KUMAR PADALA - avatar
1 Answer
+ 4
The pattern attribute specifies a regular expression that the <input> element's value is checked against. (read more in the following link) [HTML input pattern attribute] https://www.w3schools.com/tags/att_input_pattern.asp [HTML pattern attribute] https://www.w3schools.com/tags/att_pattern.asp [JavaScript RegExp object] https://www.w3schools.com/js/js_regexp.asp Hth, cmiiw
13th Nov 2017, 3:42 AM
Ipang