title: How to get a better email error in ZF2 using Forms
body: <p>I am wondering how to change the email error message returned from a form:</p>
  
  <p><a href="https://i.stack.imgur.com/ZYHpU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZYHpU.png" alt="enter image description here"></a></p>
  
  <p>The error in the image is pretty ugly.</p>
  
  <p>This is my form:</p>
  
  <pre><code>    $this-&gt;add(
          [
              'name'       =&gt; 'email',
              'type'       =&gt; 'email',
              'options'    =&gt; [
                  'label' =&gt; 'E-Mail',
                  'instructions' =&gt; 'Your email address'
  
              ],
              'attributes' =&gt; [
                  'class' =&gt; 'form-element',
                  'required' =&gt; 'required',
              ]
          ]
      );
  </code></pre>
  
  <p>Would be nice for the message to state: "That email is already registered" or "Email me@example.com is already in use"</p>
  
  <p>How do you do this?</p>