NYCPHP Meetup

NYPHP.org

[nycphp-talk] Zend_Form fed by Zend_Config = Zend_Hair_Pull

Hans Kaspersetz hans at cyberxdesigns.com
Wed May 21 00:28:18 EDT 2008


> My translation of how that should be is something like this:
>
> elements.myField.prefixPaths.validator.prefix = "My_Validate"
> elements.myField.prefixPaths.validator.path = "My/Validate/"
> elements.myField.prefixPaths.validator.type = "validate"
>
> elements.myField.options.validators.Example.validator = "Example"
>
> but it throws a "Plugin by name Example was not found in the registry"
> error. "My/Validate/Example.php" does exist in the path, and works
> when built as a class.
>
>
>   
El Jeffe,

Try this:

;Validator must be added before any elements to be used with all 
elements.  I put mine right after the action and method.
action = "Foo"
method="post"
elementPrefixPath.validate.prefix = "My_Validate"
elementPrefixPath.validate.path = "My/Validate/"

; Stuff for the element
elements.MyField.options.validators.validatoralias.validator = 
"ExampleValidator"
elements.MyField.options.validators.validatoralias.options.ExtraArugemnentsPassedToValidator 
= "foobar"

Have fun with this stuff!  Ug!

Hans Kaspersetz
Cyber X Designs
http://www.cyberxdesigns.com
X-Cart, Joomla, MODx, Zend Framework, and Custom PHP Programming we can 
do it all.  Visit our website to learn more.





More information about the talk mailing list