Re: [symfony-users] [v2.0.0BETA1] Array data and validation with Forms

2011-05-19 Thread dbenjamin
Hi Bernhard, Thanks for your response. Can i define form validation constraints from my XML file, when i'm defining the service ? ??? * -- Benjamin Dulau - anonymation CEO anonymation.com | code.anonymation.com ben...@a

Re: [symfony-users] [v2.0.0BETA1] Array data and validation with Forms

2011-05-18 Thread Bernhard Schussek
Hi Benjamin, You can use the collection constraint for this. use Symfony\Component\Validator\Constraints\Collection; use Symfony\Component\Validator\Constraints\NotNull; $defaults = array('foo' => 'bar'); $form = $factory->create('form', $defaults, array( 'validation_cons

[symfony-users] [v2.0.0BETA1] Array data and validation with Forms

2011-05-17 Thread dbenjamin
Hi, I saw a commit adding a way to specify the form constraint on the fly : http://goo.gl/begfs In the commit i see also a new attribute : >setAttribute('validation_constraint', $options['validation_constraint']) And that's what i'm interested in. My form Type is defined as a service, and i wo