title: Display Zend_Form form errors in ViewScript
body: <p>I'm trying to display all form errors before the form using a ViewScript. Here is the code that I'm currently trying to use within my ViewScript:</p>
  
  <pre><code>&lt;div class="errors"&gt;
  &lt;?php echo $this-&gt;formErrors($this-&gt;element-&gt;getMessages()); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This call gives me an error message:</p>
  
  <blockquote>
    <p>Warning: htmlspecialchars() expects parameter 1 to be string, array given </p>
  </blockquote>
  
  <p>I've seen this same code suggested other places but its not working for me. If I print out $this->element->getMessages() I do see the error messages as the following:</p>
  
  <blockquote>
    <p>Array ( [myField] => Array ( [isEmpty] => Value is required and can't be empty ) ) </p>
  </blockquote>
  
  <p>Any ideas?</p>