re: How to validate an email address in JavaScript VIEW POST


Your regex doesn't allow for many valid email addresses. Basically just about anything before the "@" symbol (the local part) is allowed. A lot of gmail addresses have the format


"The local part can be up to 64 characters in length and consist of any combination of alphabetic characters, digits, or any of the following special characters:

! # $ % & ‘ * + – / = ? ^ _ ` . { | } ~

NOTE: The period character (“.”) is valid for the local part subject to the following restrictions:

  • it is not the first or last character
  • two or more consecutive periods"


Code of Conduct Report abuse