Skip to content

Instantly share code, notes, and snippets.

@tanrax
Created March 21, 2014 08:51
Show Gist options
  • Save tanrax/9682209 to your computer and use it in GitHub Desktop.
Save tanrax/9682209 to your computer and use it in GitHub Desktop.
JS: Comprobar correo (e-mail)
//Comprobar que es un e-mail válido
var sExpr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(!sExpr.test(correo.value)) {
bError = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment