Hi Alan, Obviously I wasn't really awake that day... The form is SubscriberForm (not NewsletterForm) and it extends BaseSubscriberForm. I had to copy/paste the code from BaseSubscriberForm to SubscriberForm to make it work.
On Apr 11, 8:37 pm, Alan Bem <alan....@gmail.com> wrote: > Aren't you talking about two different Forms? It seems that first > post-validator comes from (Base)SubscriberForm, but you complaint about > NewsletterForm. > Is there inheritance relationship beetween them? > > Cheers > > On Sat, Apr 10, 2010 at 5:05 PM, godbout <guillaume.lecler...@gmail.com>wrote: > > > > > Hi there! > > > I have a very simple thing to do: allowing visitors to register their > > email for a newsletter. > > The email field is defined as unique in the db, and Doctrine created > > me the BaseForm with the following code:... > > > [code]$this->validatorSchema->setPostValidator( > > new sfValidatorDoctrineUnique(array('model' => 'Subscriber', > > 'column' => array('email'))) > > ); > > [/code] > > > ...which is exactly what I want. But it didn't work until I copy/ > > pasted exactly the same code in my NewsletterForm. > > > Any explanation for that? > > My NewsletterForm doesn't contain much, but it redefined the email > > field validator from ValidatorString to ValidatorEmail. Would that > > cause the problem? I'm still surprised. > > > Let me know if you have an idea ;-) > > > Guill > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > 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 > > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@goog > > legroups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en > > > To unsubscribe, reply using "remove me" as the subject. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en