Did your form have failed validations on submission? In most cases, you can simply render the form again, and errors will be displayed when using the default decorators:
<?php
if (!$form->isValid($_POST)) {
echo $form;
// or assign to the view object and render a view...
$this->view->form = $form;
return $this->render('form');
}
If you want to inspect the errors, you have two methods.
getErrors() returns an associative array of element
names / codes (where codes is an array of error codes).
getMessages() returns an associative array of element
names / messages (where messages is an associative array of error
code / error message pairs). If a given element does not have any
errors, it will not be included in the array.




