I have a PR that relates to validating form children here:
https://github.com/symfony/symfony/pull/797

The issue of too many DelegatingValidators is one I hadn’t noticed before. It 
looks like FieldTypeValidatorExtension doesn’t have enough information to 
determine what is root and what isn’t in buildForm(). I wonder if it is 
possible to make FormBuilder parent-aware?

k 
On Monday, May 16, 2011 at 7:20 AM, John Wards wrote:
As everything in the new Form component is a Form I was wondering why
> we call Validate on bind for children?
> 
> https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L558
> 
> I experimented and wrapped that foreach in an if that only fired when
> the Form had children, and the form still validated as expected. The
> reason is because all the validation is done in the Delegating
> validator in the root form.
> 
> This also leads me into my next issue, why does each field have a
> DelegatingValidator attached to it? The first thing a
> DelegatingValidator does is check that the field is a root, which
> fields aren't. Feels like a bit of an overhead having all these
> objects kicking about that aren't needed. Also makes it a nightmare
> for debugging.
> 
> John
> 
> -- 
> 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 developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
> 

-- 
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 developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to