0

I want a email validation pattern for all latest browsers. The field type must be in text, not in email.

I tried the different type of patterns like below, but not working in all browsers.

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b
^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$
/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
unor
  • 92,415
  • 26
  • 211
  • 360
saravankg
  • 909
  • 1
  • 10
  • 21

2 Answers2

1

After apply you check in browser "Inspect element" its work on this type

data-regex="^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,6})$"
unor
  • 92,415
  • 26
  • 211
  • 360
0

Use this in input field pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\\.com$"