Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

how to validate multiple emails

Thread view: 
shailajabtech@gmail.com - 30 Jan 2007 08:36 GMT
hi all,

in my application i have to validate multiple emails .
in the Application we are using jsp's, struts.
i know how to validate a single email but dont know for multiple
emails
if anybody know the solution how to validate them please reply back.

Thanks in Advance
Alex Hunsley - 30 Jan 2007 09:34 GMT
> hi all,
>
> in my application i have to validate multiple emails .

Define "validate emails" clearly, or no-one has a hope of helping you.

> in the Application we are using jsp's, struts.
> i know how to validate a single email but dont know for multiple
> emails
> if anybody know the solution how to validate them please reply back.
Chris Dollin - 30 Jan 2007 09:42 GMT
> in my application i have to validate multiple emails .
> in the Application we are using jsp's, struts.
> i know how to validate a single email but dont know for multiple
> emails

Can you not write Java code corresponding to:

   for m in each of the multiple emails M do
       validate email( m )
   endfor

Presumably some assumptions I've made are wrong?

Signature

Chris "electric hedgehog" Dollin
"No-one here is exactly what he appears." G'kar, /Babylon 5/

ali - 30 Jan 2007 10:25 GMT
On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
<shailajabt...@gmail.com> wrote:
> hi all,
>
[quoted text clipped - 5 lines]
>
> Thanks in Advance

if you means that you would like to check the email is correct by
(validate)

then doing so for multiple email

is just tokinize the emails string using yourString.splite(",");
then trim each token

and do your validation for each token

Is that what you are asking about ?!
shailajabtech@gmail.com - 30 Jan 2007 10:59 GMT
> On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
>
[quoted text clipped - 20 lines]
>
> Is that what you are asking about ?!

in the jsp
in the text field  am adding multiple emails with comma seperated.
using  dynavalidatorForm defined in the  struts-config.xml am getting
in to the Action class.
in the Action class am doing tokenization and trimming operations
but how to validate them ( checking whether is it  correct email
format or not)
before when i have to validate single email,then i declared that field
in the validation.xml

but u told that after tokennizing do validation,but how .
i think it may not work.
if u know please explain me clearly, so that i can understand.

thanQ
dagarwal82@gmail.com - 30 Jan 2007 11:43 GMT
You can define a pattern for a correct e-mail id. like , a correct e-
mail id is one which has atleast :-
1) @   (say this implies A)
2) .com , .net , .co.in .....( make a pattern for this too nd say this
implies B)
3) now B should come immediately after A
4) there should be some text before A too.
I guess u got the idea. Its just how make your algo to work out with
validating an e-mail.
I hope i m clear!
Alex Hunsley - 30 Jan 2007 12:18 GMT
>> On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
>>
[quoted text clipped - 31 lines]
> i think it may not work.
> if u know please explain me clearly, so that i can understand.

You are asking other people for 'clearly'? When you're not even taking
care to communicate yourself? hahaha!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.