First of all form validation should proabaly be done in JavaScript on the
client (too silly to come back to server for) and second of all that's pretty
much all you can do.

Some mail servers allow for checking if a given user exists on them but this
can't be relied upon.

dave.

"blueads.com" wrote:

> Does anyone have a good example of checking for valid email that they care
> to share? Better than this one?
>
> // Make sure email it is not null
> if(email == null)
>                 return false;
>                 int length=email.length();
> if((length > 3 && length < 31) && (email.indexOf('@') > -1) &&
> (email.indexOf('.') > -1))
>                         return true;
>                 else
>                         return false;
>
> Tom K.
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

--
David Mossakowski              [EMAIL PROTECTED]
Programmer                           212.310.7275
Instinet Corporation

"I don't sit idly by, I'm planning a big surprise"

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to