Hi, I am trying to add custom error to an element. The error is added fine, but its format is different from the errors that normally occure in the form.
When an error occurs in the form $form->getMessages () returns an array with the error codes as the key: ["usr_passwd"] => array(3) { ["regexNotMatch"] => string(86) "message1" ["stringLengthTooShort"] => string(51) "message2" ["isEmpty"] => string(26) "message3" } When I add an error with addError I don't know how to set the key, it seems that the input is automatically interpreted as a string so I get numerical keys: ["usr_uname"] => array(2) { [0] => string(3) "bbb" [1] => string(3) "ddd" } How can I add an error as an array with a key so that the final error format in the form would be identical no matter where it comes from? Thanks for the help. SWK -- View this message in context: http://old.nabble.com/zend-form-addError-tp26304909p26304909.html Sent from the Zend Framework mailing list archive at Nabble.com.