Zend Framework

File validators aren't being included automatically

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.3
  • Fix Version/s: 1.9.6
  • Component/s: Zend_Form
  • Labels:
    None

Description

In revision 12848 of the 1.7 branch, I have to manually add the prefix path for the file validators like this:

$element = new Zend_Form_Element_File('foo');
$element->addPrefixPath('Zend_Validate_File', 'Zend/Validate/File', 'validate');
$element->addValidator('Count', false, 1);

Otherwise, I get this exception:
Zend_Loader_PluginLoader_Exception: Plugin by name 'Count' was not found in the registry; used paths: Zend_Validate_: Zend/Validate/

I'm assuming the prefix path used to be set automatically, because it's not mentioned in the documentation:
http://framework.zend.com/manual/en/zend.form.standardElements.html#zend.form.standardElements.file

Activity

Hide
Thomas Weidner added a comment -

Matthew, havn't you already fixed this in trunk ?
There was an related issue the last days which you was also related to PluginLoader which you have fixed.

Show
Thomas Weidner added a comment - Matthew, havn't you already fixed this in trunk ? There was an related issue the last days which you was also related to PluginLoader which you have fixed.
Hide
Thomas Weidner added a comment -

Tested with actual release but not able to verify it.
Looks like it's already been fixed in past.

Show
Thomas Weidner added a comment - Tested with actual release but not able to verify it. Looks like it's already been fixed in past.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: