Bingo Ernie,
        I realize that there are some browsers that do not support javascript so I
want the error checking done on the server because of it's importance. What
I have for checking is OK but I want to go a step further and check for
.net, .com .edu etc. No problem, I will figure it out, just thought someone
had something so I wouldn't have to reinvent the wheel.

Sincerely,

Tom K.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Ernie
V
Sent: Monday, February 14, 2000 5:06 PM
To: [EMAIL PROTECTED]
Subject: Re: email check


Depending on how complex your validation schema is, may be one factor in
determine if JavaScript is appropriate or if server-side processing is the
right
thing to do. For example, you may have complex validation logic, or require
that
a dynamic page be presented under certain error conditions, or serve up
messages
from a database. There are many other reasons that I have come across where
server side proccessing is the best solution.

Another thought... a site may have requirements to gaurd against browsers
that
don't support JavaScript. This is especially true with sites that require
adherence to accessibility standards. W3C standards for accessibility
discourage
the use of client side processing because it makes the page less accessible
to
those who are vision impaired or with other accessibility needs. In these
cases,
the only solution is server side proccessing.

As to the code below, the logic seems perfectly acceptable, but it is simple
enough that one might want to consider client side processing using
JavaScript.

As with most web architectures, there is hardley ever a "one size fits all"
solution.

-ernie


David Mossakowski wrote:

> 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

___________________________________________________________________________
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