-- Greg Frith <[EMAIL PROTECTED]> wrote
(on Thursday, 14 February 2008, 01:49 PM +0000):
> On 14 Feb 2008, at 13:11, Matthew Weier O'Phinney wrote:
>     -- Greg Frith <[EMAIL PROTECTED]> wrote
>     (on Thursday, 14 February 2008, 12:24 PM +0000):
> 
>         I'm trying to use my XML config file to add custom validator paths to
>         every
> 
>         element in a Zend_Form instance.
> 
> 
> 
>         Here is an extract from my configuration file (this is the config tree
>         I pass
> 
>         to new Zend_Form):
> 
> 
> 
>         <name>userRegister</name>
> 
>         <action>/authentication/register/</action>
> 
>         <method>post</method>
> 
>         <elementPrefixPaths>
> 
> 
>     The above should be singular (even though it allows for multiple
>     entries): 'elementPrefixPath'. That should solve your issue, including
>     the exception from attempting to load the custom validator class.
> 
> 
> Thanks Matthew,
> 
> Have tried this (see below) but still the extra prefix and path are not added
> to element pluginloaders.

Odd -- I just tried this on my own box, using the config you provided,
and it worked fine; here's a portion of a var_export() I did on my form
object:

        'VALIDATE' => 
        Zend_Loader_PluginLoader::__set_state(array(
           '_prefixToPaths' => 
          array (
            'Zend_Validate_' => 
            array (
              0 => 'Zend/Validate/',
            ),
            'WETB_Validate_' => 
            array (
              0 => 'WETB/Validate/',
            ),
          ),
           '_loadedPlugins' => 
          array (
            'WordChars' => 'WETB_Validate_WordChars',
            'StringLength' => 'Zend_Validate_StringLength',
          ),
           '_useStaticRegistry' => NULL,
        )),

As you can see, the plugin loader has the path, and the validator was
loaded (I created a dummy validator so I could test).

Are you using current trunk? If not, could you send me a copy of your
code and config file offline so I can see if I can diagnose the issue?

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to