ZF-12078: Zend_Form_Element_File not returning validators


When I retrieve the validators from a file element nothing is returned But! if i call the getTransferAdapter for the element, and call on it the getValidators I do get the validators


$file = new Zend_Form_Element_File('image');
$file->addValidator('Count', false, 1);
print_r($file->getValidators()); // nothing is retrieved
$adapter = $file->getTransferAdapter();
print_r($adapter->getValidators()); // i get my validators


  • Code tags added.
  • Priority downgraded because a workaround exists.