Hey there,
I have a little problem with the translation of the form errors. It's
working fine when I do form->validate(), but it's only returning one Error.
Even when there are more Errors.
Strange thing is, if I don't set a translation of e.g. the alpha-validator,
and I fill in a value that is not alpha and shorter then 6 charachters, it
gives me 2 errors, one translated for the 'to short' and one non translated
for the 'alpha'. Set I both translations I only get the first validator
error.
Anyone an idea? Thanks...
in the application:
$translate = new Zend_Translate('Array', '/app/languages/dutch.php',
'nl_NL');
Zend_Registry::set('Zend_Translate', $translate);
in the viewsetup:
$viewRenderer->view->translate = Zend_Registry::get('Zend_Translate');
in the form:
$formElements[] = self::createElement('password', 'newpwd')
->addValidator('alpha')
->addValidator('StringLength', false, array(6))
->setRequired(true)
->setLabel('new password');
in the translate file
'isEmpty' => 'emptytext",
'stringLengthTooLong'=>"to long",
...
-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context:
http://www.nabble.com/zend-translate-and-form-errors-tp21582460p21582460.html
Sent from the Zend Framework mailing list archive at Nabble.com.