I use Javascript on the client side for this. Something like:

if (myform.email.value.search(/^[a-zA-Z0-9\-\.]+\@[a-zA-Z0-9\-\.]+$/)
== -1)


    alert('ERROR: Badly formatted E-mail address.');
    error = 1;
    return;
    }

Gert Koning
University of South Africa

----- Original Message -----
From: ramadevi <[EMAIL PROTECTED]>
Sent: Monday, January 24, 2000 08:49
Subject: Re: Email Validation


> hai
> find the index of '@' and check whether it is first character or not
> you can find the index by using indexOf(char) of string class
>
>
>
> Fei Fei Lua wrote:
>
> > i've been trying to do some validation on email format from a html
form, i need to
> > read " @email.com.cc" and prompt to user that it is not a valid
email format which
> > should be "[EMAIL PROTECTED]" instead.
> >
> > how do i do this ? is this the norm of email validation ???
> > below is my program, when i run i have nullpointer exception at
> > MemberBean.testEmail
> > thank you for your attentions and inputs.
> >

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to