Closed
Description
For example:
$builder = $this->get('form.factory')->createBuilder();
$form = $builder
->add('documents', 'file', array(
'required' => false,
'multiple' => true,
'constraints' => array(
new Count(array('min'=>1)),
)
))
->add('submit', 'submit')
->getForm()
;
This validates true even if no file is selected. If min is greater than one, however, the constraint behaves as expected and the form fails with "This collection should contain # elements or more."
Experiencing this in both 2.5.7 as well as 2.6.0-BETA1.