title: zendfamework 2 form validation set attributes to an input
body: <p>Is it possible to do while validate a form with an input filter to not just send an error message but also set the border colour change to red?</p>
  
  <p>something like this:</p>
  
  <pre><code>$this-&gt;add(array(
          'name' =&gt; 'test',
          'required' =&gt; true,
          'attributes' =&gt; array(
                  'style' =&gt; 'border-color:red'
          ),
          'validators' =&gt; array(
              array(
                  'name' =&gt; 'NotEmpty',
                  'options' =&gt; array(
                      'messages' =&gt; array(
                          \Zend\Validator\NotEmpty::IS_EMPTY =&gt; 'Please fill me out'
                      )
                  )
              )
          )
      ));
  </code></pre>