Validating email addresses using jQuery and regex

Report
Question

Please briefly explain why you feel this question should be reported .

Report
Cancel

This is a regular-expression validating email addresses using jQuery comparison that will test a bunch of valid/invalid email address against the regex provided below.

This is a very basic functionality to validate the email address. In this post, I will show you how to validate the email address using jQuery. To validate the email address, I have created a separate function which based on email address, returns true or false. Email address validation is done using regular expression.

 function isValidEmailAddress(emailAddress) {
        var pattern = new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
        return pattern.test(emailAddress);
    };
0
jQuery 3 weeks 0 Answer 15 views 0

About Irfan

I love to Develop Websites, Applications and UI Design. I'm a Certified Developer, blogger and owner of Codexjunction.com. My friends call me WordPress Expert too. I like to learn and share technical stuff. For more info quick message me, I'll help you out.

Leave an answer

Captcha Click on image to update the captcha .

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>