Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to validate multiple emails

Reply
Thread Tools

how to validate multiple emails

 
 
shailajabtech@gmail.com
Guest
Posts: n/a
 
      01-30-2007
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

 
Reply With Quote
 
 
 
 
Alex Hunsley
Guest
Posts: n/a
 
      01-30-2007
wrote:
> 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.

 
Reply With Quote
 
 
 
 
Chris Dollin
Guest
Posts: n/a
 
      01-30-2007
wrote:

> 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?

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

 
Reply With Quote
 
ali
Guest
Posts: n/a
 
      01-30-2007
On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
<shailajabt...@gmail.com> wrote:
> 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


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 ?!


 
Reply With Quote
 
shailajabtech@gmail.com
Guest
Posts: n/a
 
      01-30-2007
On Jan 30, 3:25 pm, "ali" <ali4ev...@gmail.com> wrote:
> On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
>
> <shailajabt...@gmail.com> wrote:
> > 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

>
> 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 ?!


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

 
Reply With Quote
 
dagarwal82@gmail.com
Guest
Posts: n/a
 
      01-30-2007
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!

 
Reply With Quote
 
Alex Hunsley
Guest
Posts: n/a
 
      01-30-2007
wrote:
> On Jan 30, 3:25 pm, "ali" <ali4ev...@gmail.com> wrote:
>> On Jan 30, 12:36 pm, "shailajabt...@gmail.com"
>>
>> <shailajabt...@gmail.com> wrote:
>>> 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

>> 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 ?!

>
> 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.


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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Sending Emails to Multiple Receipents and with multiple options Jai ASP .Net 5 09-12-2006 06:58 PM
Scanning my emails for harmfull emails etc lee.ingram Computer Support 4 01-12-2006 01:21 AM
Multiple buttons validate different controls???? msnews.microsoft.com ASP .Net 4 05-16-2005 10:10 PM
How to stop Sir name showing on emails from hotmail emails Drifter Computer Information 3 07-07-2004 07:15 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57