Skip to content

Instantly share code, notes, and snippets.

@johngrimes
Created May 5, 2009 13:07
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 johngrimes/106958 to your computer and use it in GitHub Desktop.
Save johngrimes/106958 to your computer and use it in GitHub Desktop.
Validating email addresses using JavaScript
var email = new LiveValidation('email');
email.add(Validate.Presence);
email.add(Validate.Format, { pattern: /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment