-- Bart McLeod <[email protected]> wrote (on Thursday, 09 June 2011, 01:15 PM +0200): > This has come up in #zftalk.dev > > Zend_Filter_Input and Zend_Validate have overlapping functionality > when considered as validation chains. > > How will we approach this in ZF 2? Will we keep both or will we let > Zend_Validate take over what is currently the added value of > Zend_Filter_Input? So that current users of Zend_Filter_Input will > have a good replacement?
So, there's actually even more overlap than that. Zend_Filter_Input creates and utilizes both filter and validation chains... without using the related functionality from either component. Additionally, it has the concepts of aggregated error messages, treatment of not/empty values, and treatment of required values. Finally, these chains and concepts are _per_ value; in other words, Zend_Filter_Input deals in _sets_ of values. So, it has a lot of added value over either. My feeling on it is that we need to: * Add concepts for required and "allow empty" to validation chains * _use_ the chaining functionality from each of the filter and validator components If those are all in place, the InputFilter can actually become the core (if not full) functionality of Zend_Form (assuming we can then move decoration into the view layer and have it query the elements for potential view metadata). -- 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]
