The standard e-mail pattern "[^@]+@[^@]+.[a-zA-Z]{2,6}" doesn't work because of the backslash.
Since the backslash is a escape character in JS the parsed HTML looks like:
pattern="[^@]+@[^@]+.[a-zA-Z]{2,6}"
Solution: add a backslash before the backslash to escape the escape character. Like this:
emailPattern = "[^@]+@[^@]+\\.[a-zA-Z]{2,6}"
The standard e-mail pattern "[^@]+@[^@]+.[a-zA-Z]{2,6}" doesn't work because of the backslash. Since the backslash is a escape character in JS the parsed HTML looks like:
pattern="[^@]+@[^@]+.[a-zA-Z]{2,6}"
Solution: add a backslash before the backslash to escape the escape character. Like this:
emailPattern = "[^@]+@[^@]+\\.[a-zA-Z]{2,6}"