title: How to remove a validator from a Form Element / Form Element ValidatorChain in Zend Framework 2?
body: <p>I read this question on SO: "<a href="https://stackoverflow.com/q/16248482/2019043">how to disable inArray validator forms in zend framework2</a>" and was trying to find it out, but couldn't find any way to detach/remove the <code>InArray</code> Validator. But <code>InArray</code> is just <em>a</em> validator. So how can remove a validator from the validator list of a form element?</p>
  
  <p>I can get the validators:</p>
  
  <pre><code>$myElement = $form-&gt;getInputFilter()-&gt;get('city');
  $validatorChain = $cityElement-&gt;getValidatorChain();
  $validators = $validatorChain-&gt;getValidators();
  </code></pre>
  
  <p>and maybe can then unset the array element with the validator, I want to remove, and then pass the result array back to the Input object and to the form element. But it's really dirty and surely not the recommended way.</p>
  
  <p>So how to remove a validator from a form element?</p>