Skip to content

Validate an email adress in JavaScript

JavaScript has not native method to validate an email adress, however, you can use the following regex:

Here is an example testing the regex with some example emails.

[sc name=”src” url=”https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.