Re: webdb.isemailaddress: in my opinion it doesn't work

From: Brooks Vaughn <brooks_at_tidalwave.net>
Date: 2000/08/03
Message-ID: <398A0A25.D325CFE6_at_tidalwave.net>#1/1


I am using the following. It may be the same as the builtin one and I know it is very basic. Doesn't check for more than a _at_ sign.

function isEmail(theElement, theElementName) {   str = theElement.value;
  if (!(result = ((str != "") && (str.indexOf("_at_") != -1) && (str.indexOf(".") != -1)))) {

    alert( theElementName + " value must be an email address." );     theElement.focus();
  }
 return result;
}

-Brooks Vaughn
MailTo:brooks_at_tidalwave.net

Francesco Dini wrote:

> Somebody has never used this function for validating a field?
> I think that it doesn't work correctly. For example my address isn't
> good for it.
> Francesco
Received on Thu Aug 03 2000 - 00:00:00 CEST

Original text of this message