Skip to content

Instantly share code, notes, and snippets.

@yao3060
Created September 6, 2012 03:13
Show Gist options
  • Save yao3060/3650568 to your computer and use it in GitHub Desktop.
Save yao3060/3650568 to your computer and use it in GitHub Desktop.
Javascript Field Valid
function isEmail(str){
var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
return reg.test(str);
}
function IsNumeric(input)
{
return (input - 0) == input && input.length > 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment