how to validate multiple emails

Discussion in 'Java' started by shailajabtech@gmail.com, Jan 30, 2007.

  1. Guest

    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
     
    , Jan 30, 2007
    #1
    1. Advertising

  2. Alex Hunsley Guest

    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.
     
    Alex Hunsley, Jan 30, 2007
    #2
    1. Advertising

  3. Chris Dollin Guest

    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/
     
    Chris Dollin, Jan 30, 2007
    #3
  4. ali Guest

    On Jan 30, 12:36 pm, ""
    <> 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 ?!
     
    ali, Jan 30, 2007
    #4
  5. Guest

    On Jan 30, 3:25 pm, "ali" <> wrote:
    > On Jan 30, 12:36 pm, ""
    >
    > <> 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
     
    , Jan 30, 2007
    #5
  6. Guest

    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!
     
    , Jan 30, 2007
    #6
  7. Alex Hunsley Guest

    wrote:
    > On Jan 30, 3:25 pm, "ali" <> wrote:
    >> On Jan 30, 12:36 pm, ""
    >>
    >> <> 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!
     
    Alex Hunsley, Jan 30, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Natty Gur
    Replies:
    0
    Views:
    383
    Natty Gur
    Aug 19, 2003
  2. Wim Hollebrandse

    Re: Sending multiple emails (1000+) using dotnet

    Wim Hollebrandse, Aug 19, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    415
    Wim Hollebrandse
    Aug 19, 2003
  3. Jai
    Replies:
    5
    Views:
    482
    Juan T. Llibre
    Sep 12, 2006
  4. Joey Martin

    sending multiple emails

    Joey Martin, May 4, 2004, in forum: ASP General
    Replies:
    1
    Views:
    141
    Aaron Bertrand - MVP
    May 4, 2004
  5. Terry

    Help with Sending Multiple Emails!

    Terry, Oct 6, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    159
    P.R.Brady
    Oct 7, 2004
Loading...

Share This Page