ZF-2834: Zend_Form should provide mechanisms for postfiltering

Issue Type: New Feature Created: 2008-03-08T09:56:38.000+0000 Last Updated: 2012-08-31T09:14:40.000+0000 Status: Postponed Fix version(s): Reporter: Matthew Weier O'Phinney (matthew) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Form

Related issues: Attachments:


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().


Posted by Wil Sinclair (wil) on 2008-03-21T17:05:33.000+0000

This issue should have been fixed for the 1.5 release.

Posted by Wil Sinclair (wil) on 2008-03-25T20:29:11.000+0000

Please categorize/fix as needed.

Posted by Cristian Bichis (avantis) on 2009-06-02T11:03:58.000+0000

This feature is a nice enhancement.

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

Posted by Matthew Weier O'Phinney (matthew) on 2009-10-15T09:29:03.000+0000

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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.