symfony/symfony — pull request #4326 by odolbeau (2012-05-18 11:36:25+00:00)
Title: constraint_validation option can now be an array

It's now possible to pass an array of Constraint.

Here is a simple concret example:

```php
class NewPasswordType extends AbstractType
{
public function getDefaultOptions()
{
return array(
'type' => 'password',
'options' => array(
'required' => true,
),
'validation_constraint' => array(
new NotBlank(),
new MinLength(5)
),
);
}

public function getParent(array $options)
{
return 'repeated';
}
}
```