ZF-2834: Zend_Form should provide mechanisms for postfiltering

Description

Currently, Zend_Form implements a pre-filter, allowing the ability to normalize or filter data prior to validation to make validations easier and/or more semantically correct.

However, in some cases, it may be useful to have a postfilter as well. For instance, if you were to attach a form to a model as both a validator and a mechanism for rendering the model as a form, you might wish to have a postfilter available for use when injecting the data into the model's storage mechanism (for instance, encoding data as base64 for use with xml-rpc, or passing through a database's quoting mechanisms prior to injection, etc).

I propose such a postfiltering mechanism work in conjunction with validation; it would only be applied after the data has passed validation. Additionally, a mechanism should be in place to filter the data on-demand, and this should be separate from getValue().

Comments

This issue should have been fixed for the 1.5 release.

Please categorize/fix as needed.

This feature is a nice enhancement.

Currently seems to be more complicated to automated such things for injecting the data into model.

Postponing the issue until 2.0. I'd like to create the ability to create validation/filter/decorator chains as separate objects that you then attach to Zend_Form/Zend_Form_Element. This will make adding postfilters easier.