ZF-4651: Zend_Form adding filters and validators does not work with full class name anymore

Issue Type: Patch Created: 2008-10-20T12:57:58.000+0000 Last Updated: 2010-04-16T13:07:14.000+0000 Status: Resolved Fix version(s): - 1.10.4 (28/Apr/10)

Reporter: Ralf Eggert (ralf) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

Related issues: Attachments:


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


on line 370

The manual needs to be changed here:……

See also discussion:…


Posted by Christian Albrecht (alab) on 2010-04-06T11:22:44.000+0000

Confimed in current trunk, here is a patch

<pre class="highlight">
Index: documentation/manual/en/module_specs/Zend_Form-Elements.xml
--- documentation/manual/en/module_specs/Zend_Form-Elements.xml (Revision 21764)
+++ documentation/manual/en/module_specs/Zend_Form-Elements.xml (Arbeitskopie)
@@ -232,8 +232,7 @@
-                    providing a filter name - either a short name or fully
-                    qualified class name
+                    providing a short filter name
@@ -246,9 +245,6 @@
 // Concrete filter instance:
 $element->addFilter(new Zend_Filter_Alnum());
-// Fully qualified class name:
 // Short filter name:
@@ -368,8 +364,7 @@
-                    providing a validator name - either a short name or fully
-                    qualified class name
+                    providing a short validator name
@@ -382,9 +377,6 @@
 // Concrete validator instance:
 $element->addValidator(new Zend_Validate_Alnum());
-// Fully qualified class name:
 // Short validator name:

Posted by Matthew Weier O'Phinney (matthew) on 2010-04-16T13:07:14.000+0000

Patch applied to trunk and 1.10 release branch

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.