title: zend validate multi select box
body: <p>i am using zend validations in my form and i could not validate a multi select box in my form.</p>
  
  <p><strong>This is my multi select element in the form:</strong></p>
  
  <pre><code>$days = new Zend_Form_Element_Select('day');
  $days-&gt;setLabel('Days')
  -&gt;addMultiOptions($total_days)
  -&gt;setRequired(true)
  -&gt;addValidator('NotEmpty')
  -&gt;setAttrib('multiple', 'multiple');
  </code></pre>
  
  <p><strong>I get the following error during form submission, even when i select some option in the multiselect box:</strong></p>
  
  <blockquote>
    <p><em>Array was not found in the haystack</em></p>
  </blockquote>
  
  <p>And i see the following code in Zend/Validate/InArray.php, that can validate only single form elements, but not arrays:</p>
  
  <pre><code>public function isValid($value)
  {
  $this-&gt;_setValue($value);
  if (in_array($value, $this-&gt;_haystack, $this-&gt;_strict)) 
  {
  return true;
  }
  }
  </code></pre>
  
  <p>But how can i resolve the error?</p>