Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Email validation


< script >
function checkEmail(myForm) {
  if ( /^ \w + ([\. - ] ? \w + ) * @\w + ([\. - ] ? \w + ) * (\.\w{2,3}) + $ / .test(myForm.emailAddr.value)) {
  return ( true )
}
 alert( "Invalid E-mail Address! Please re-enter." )
  return ( false )
}
</ script >