Question

Email Validation Error

Hi community,

Please check I have updated code for email validation. But the result is not as expected. 

I want to validate bhumika.bisht@gmail.com format.

Please help and check my code.

Like 0

Like

1 comments

Probably, the regular expression is incorrect. Please try to use another one, for example:

var pattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; pattern.test("bhumika.bisht@gmail.com");

Please feel free to use the website https://regex101.com/ to test your regular expression.

 

 

 

Show all comments