1.

How to validate email using jQuery?

Answer»

By including @ and following the EMAIL naming standards, email can be validated using jQuery.

Example

FUNCTION validateEmail(sEmail) {
      var FILTER = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
      if (filter.test(sEmail)) {
          return true;
      } else {
          return FALSE;
      }
}



Discussion

No Comment Found