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!