0

I am using the below regex in my pattern attribute in Html for validating emails. (type="email" keeps the email with no domain extensions).

<input type="text" name="value" class="form-control" placeholder="Value" pattern="[-\w+.%]+@[\w-.]+\.[A-Za-z]{2,4}(?:,[-\w+.%]+@[\w-.]+\.[A-Za-z]{2,4}){0,4}"/>

But this is not working in the chrome, but is working fine in Internet Edge browser.Can anyone help me with this?

2
  • Also, this regex pattern is validating correctly in other sites. Commented Apr 17, 2020 at 9:10
  • Of course, [\w-.] must be [\w\-.] or [\w.-] Commented Apr 17, 2020 at 9:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.