I put the class under
application\validate\PasswordConfirmation.php
And it doesn't work.
Error
Class 'Default_Validate_PasswordConfirmation' not found
still occurs.
Does anyone have this problem before?
I put the class under
application\validate\PasswordConfirmation.php
And it doesn't work.
Error
Class 'Default_Validate_PasswordConfirmation' not found
still occurs.
Does anyone have this problem before?
I usually place them at /library/CV/Validate/
Example:
/library/CV/Validate/EmpresaNueva.php:
class CV_Validate_EmpresaNueva extends Zend_Validate_Abstract {
//Validator code
}
Where library is the place where you have Zend.
Content of index.php @ /public:
$root = dirname(dirname(__FILE__));
set_include_path($root.'/application' . PATH_SEPARATOR
.$root.'/library' . PATH_SEPARATOR
. get_include_path()
);
For customer validators, you need to put them in a location that is on your include path. Also, you need to add your validator to make it available using Zend_Validate::addValidator()
.
See the documentation for more information.
Let me answer my own question:
I add the validator successfully according to this post: http://stackoverflow.com/questions/1010265/where-should-myvalidatepasswordconfirmation-put-in-zend-framework