Skip to content

Instantly share code, notes, and snippets.

@juji
Last active August 29, 2015 14:02
Show Gist options
  • Save juji/907c7376f66e326cf9e5 to your computer and use it in GitHub Desktop.
Save juji/907c7376f66e326cf9e5 to your computer and use it in GitHub Desktop.
JS - validate email
function validEmail(email){
return /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment