Wednesday , 26 April 2017
Home » JavaScript » [JavaScript] Email Validation Using Regular Expression
[JavaScript] Email Validation Using Regular Expression

[JavaScript] Email Validation Using Regular Expression

Hello Friends,

In My Previous Post, I wrote about Email Validation using Regular Expression in PHP. I thought most of developers are aware with JavaScript Email Validation but this post is for those who are not aware with JavaScript Email Validation. If you are looking for JavaScript Email validation than copy below code and you are done.

   var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   if(reg.test(email_address) == false) {
      alert('Invalid Email Address!');
      return false;
   }

Above code will used for Client side Email Validation, JavaScript Email Validation.

      
Plugin by: PHP Freelancer

About Rakshit Patel

I am PHP Freelancer, Rakshit Patel working as PHP Programmer India. I have developed this site to share my knowledge, thoughts and experience during the development of projects. We are group of developers working together. If you want to hire us for any PHP related work, you can reach me via Email, Phone or Chat.

Leave a Reply

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

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.