Adding custom validator without using Zend_Form's addElementPrefixPath

Posted by nush on Stack Overflow See other posts from Stack Overflow or by nush
Published on 2011-02-11T15:23:47Z Indexed on 2011/02/11 15:25 UTC
Read the original article Hit count: 215

Filed under:
|
|

The problem is that I don't use Zend_Form, so I can't use the built in capabilities.

I usually look for three things when setting a validator:
- its path (usually in library/path/validators/MyValidator.php)
- its class name (tried Validators_MyValidator) and
- in application.ini, the autoloaderNamespaces[] = "Validators"

I've tried different settings/namings/layouts to no avail.

When using a validator in my Zend_Validate_Input, an exception occurs, saying that it couldn't find my plugin/validator, the classes being searched only in Zend/Validate with the Zend_Validate prefix (I didn't try this prefix, though).

Wasn't there a setting in app.ini that added a prefix and a path?

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about custom