For me, the best solution is to write custom validator that parses(split)
value and check emails individually.


On 1/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
> I need to implement invite friends functionality in my application. In
> case of multiple friends, I am asking a user to enter comma separated
> multiple email addresses. If user enters correct data, then my current
> functionality works fine. But I have no validation code implemented
> currently. I need to validate following things - please help me on how
> should I approach the logic.
>
> 1. Validate multiple email addresses are ONLY COMMA separated. If it's
> a space separated, or any other character separated, then it should
> throw an error asking user to enter only comma separated email
> addresses.
>
> 2. If it's a comma separated string, then validate that each email
> address is a valid email address. Otherwise throw an error.
>
> Can you please tell me how can I use sfEmailValidator and
> sfRegexValidator validators to achieve this functionality? Or do you
> suggest any other approach - like writing custom validation class? If
> yes, any inputs on that front?
>
> Your help will be highly appreciated.
>
> Thanks,
> Aditya
> >
>


-- 
Bayarsaikhan VOLODYA
Singleton LLC - www.singleton.mn
Cell: +976 99779919

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to