ZF-4651: Zend_Form adding filters and validators does not work with full class name anymore
Description
In the manual the text and examples mention that addFilter() and addValidator() also takes the fully qualified class name like Zend_Filter_Alnum or Zend_Validate_Alnum. This does not work any more since 1.6.0 and throws the following fatal error:
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name Zend_Filter_Alpha was not found in the registry.' in /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Loader/PluginLoader.php:370 Stack trace: #0 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Element.php(1937): Zend_Loader_PluginLoader->load('Zend_Filter_Alp...') #1 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Element.php(1613): Zend_Form_Element->_loadFilter(Array) #2 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Element.php(524): Zend_Form_Element->getFilters() #3 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Element.php(541): Zend_Form_Element->_filterValue(NULL, NULL) #4 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Decorator/ViewHelper.php(201): Zend_Form_Element->getValue() #5 /home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Form/Decorator/ViewHelper.php(231): Zend_Form_Decorator_ViewHelper->getValue(Object(Zend_Form_Element_Text))
6 /home/devh in
/home/devhost/zfbuch/ZendFramework-1.6.2/library/Zend/Loader/PluginLoader.php
on line 370
The manual needs to be changed here:
http://framework.zend.com/manual/en/… http://framework.zend.com/manual/en/…
See also discussion: http://nabble.com/Problem-with-Zend_Form-and-filte…
Comments
Posted by Christian Albrecht (alab) on 2010-04-06T11:22:44.000+0000
Confimed in current trunk, here is a patch
Posted by Matthew Weier O'Phinney (matthew) on 2010-04-16T13:07:14.000+0000
Patch applied to trunk and 1.10 release branch