Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function validateEmailAddress(emailToValidate) {
if (emailToValidate == '' || typeof(emailToValidate) == 'undefined') return(false);
emailToValidate = stringTrim(emailToValidate);
var emailLength = emailToValidate.length;
var atPos = emailToValidate.indexOf('@');
var firstDotPos = emailToValidate.indexOf('.');
var lastDotPos = emailToValidate.lastIndexOf('.');
if (emailLength < 7) return(false); // minimum email address length ("x@xx.xx")
if (atPos < 1) return(false); // traps for no @, or @ as first character
if (firstDotPos < 1) return(false); // traps for no ., or . as first character
if (atPos == emailLength-1) return(false); // traps for @ as penultimate or last character
if (lastDotPos >= emailLength-2) return(false); // traps for too few digits after last . (must be at least 2)
// traps for @ character next to . character
if (emailToValidate.charAt(atPos-1) == '.' || emailToValidate.charAt(atPos+1) == '.') return(false);
return(true);
}