Il giorno martedì 26 aprile 2011 17:27:57 UTC+2, Ville Mattila ha scritto:
>
> Hi there, 
>
> I've been refactoring our app to conform most recent (and excellent) 
> Form component changes. Before it was possible to override $form- 
> >validate() to do some custom validation, however now it seems to be 
> obsolete. I've moved validation constraints into the data object by 
> defining a static loadValidatorMetadata(ClassMetadata $metadata) in 
> there. This seems to work fine and $form->isValid() evaluates to false 
> when constraints fail, but for some reason $form->getErrors() still 
> returns an empty array in this case. 
>
>
Can you post your code (using https://gist.github.com/ or pastebin) ?

Is there any possibility to loop through form errors in a controller 
> anymore? 
>

Are you sure you need to loop through errors in controller ? You can render 
your errors using renderError 
http://www.symfony-project.org/api/1_4/sfFormField#method_rendererror 
and renderGlobalErrors methods 
http://www.symfony-project.org/api/1_4/sfForm#method_renderglobalerrors

Cheers 

Francesco

---
Francesco Tassi
More about me http://flavors.me/ftassi

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

Reply via email to