On Thu, Apr 11, 2013 at 12:32 PM, Griesi <[email protected]> wrote:
> I just found out that I am wrong. Filters are in general applied before
> validation. Except with the FileInput Filter. This filter is only applied if
> §form->getData() is called. Is this a bug or an intended behaviour? Wouldn´t
> it make sense to at least apply the filter automatically if the form
> isValid?

Intended behavior. The reason is that we need to make sure that the
$_FILES entry is valid before we do anything irrevocable, such as
moving the file into a storage directory, renaming it, etc. As such,
file filters need to be invoked after validation.

--
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to