Skip to main content
Post Made Community Wiki by pera
Source Link
Adam McKee
  • 812
  • 2
  • 8
  • 14

This was stolen from http://codesnippets.joyent.com/posts/show/1917

email = $('email');
filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(email.value)) {
  // Yay! valid
  return true;
}
else
  {return false;}