why aren't error messages showing on zend_form if validation fails?
I'm trying to开发者_运维知识库 get the standard error messages to show up in zend_form but they don't.
I have this:
if ($form->isValid($formData)) {
// do stuff
} else {
$form->populate($formData);
$this->view->form = $form;
}
When I post an invalid form, the form does show up in the view like it's supposed to, but from the tutorials it seems like error messages should show up by default?
What am I missing?
Thank you for your help!
The error messages are applied using Decorator Pattern. There are some Zend Form Element Decorators present in the form by default.
I guess you have overwritten the default decorators, using e.g. setDecorators()
.
精彩评论