Details
Description
When I add an error to a Zend_Form_Element_File element:
error is not registerederror is registered, it is not returned by ::getErrors() but returned by ::getErrorMessages()- error is not outputed when element is rendered
whereas same piece of code on non-file element (text / textarea / checkbox ...) works perfectly.
Example:
<?php
// note: $form points to a Zend_Form instance and 'attachment' is a Zend_Form_Element_File object
$form->attachment->addError('An error occured');
...
echo $form->attachment;
?>
Actual result:
<dt><label for="attachment" class="optional">Attach file</label></dt> <dd><input type="file" name="attachment" id="attachment" /></dd>
Expected result:
<dt><label for="attachment" class="optional">Attach file</label></dt> <dd><input type="file" name="attachment" id="attachment" /> <ul class="errors"><li>An error occured</li></ul></dd>