Skip to content

Instantly share code, notes, and snippets.

@niksumeiko
Created May 27, 2013 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niksumeiko/5657293 to your computer and use it in GitHub Desktop.
Save niksumeiko/5657293 to your computer and use it in GitHub Desktop.
Very simple, but perfectly working, email JavaScript validation pattern.
if (!/\S+@\S+\.\S+/.test("email@example.com")) {
// Invalid email address
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment