how to validate multiple emails

S

shailajabtech

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
 
C

Chris Dollin

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

ali

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

shailajabtech

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
 
D

dagarwal82

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

Alex Hunsley

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top