I've found this input pattern value from this website.
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$
But, I don't know what this means as I don't really understand this input pattern stuff. Thank you!!
I've found this input pattern value from this website.
^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$
But, I don't know what this means as I don't really understand this input pattern stuff. Thank you!!
It is a Regular Expression used for validating an email address. the pattern
attribute is used to accept only the inputs that follow the mentioned pattern.
Simply, to understand, the above Regular Expression accepts inputs of the form xxx@yyy.yyy Here, xxx should be anything between a-z or A-Z or 0-9 or the mentioned symbols. You can repeat the xxx any no. of times, like aabzz##.
after this, an @ symbol must be included.
Later, yyy could be anything, 1 or more times, among a-z or A-Z or 0-9, followed by a dot (.). After this dot, you should have atleast 1 character between a-z or A-Z or 0-9
Note: in yyy Symbols are not allowed according to the regular expression.
If all these requirements meet, then your input is valid, otherwise, it is invalid.