title: zend array[] element with validator
body: <p>hello i have a form where the user can click on a button and dinamically add new elements(with Jquery)</p>
  
  <pre><code>&lt;input name="sconto[]" type="text"&gt;&lt;br&gt;
  &lt;input name="sconto[]" type="text"&gt;&lt;br&gt;
  &lt;input name="sconto[]" type="text"&gt;&lt;br&gt;
  ...
  </code></pre>
  
  <p>I have a custom validator for float numbers in format with comma and dot separation like 20.50 and 20,50
  The problem is i can't seem to find how to make zend apply it it to each element of the array.</p>
  
  <p>So how should i declare this element and how to apply the validator? xD</p>
  
  <p>this is my validator</p>
  
  <p>
  
  <pre><code>protected $_messageTemplates = array(
  self::NON_E_NUMERO  =&gt; 'non sembra essere un numero'
  );
  
  public function isValid($value, $context = null)
  {
      $pos_virgola = strpos($value, ",");
      if ($pos_virgola !== false)
          $value = str_replace(",", ".", $value);
  
      if (!is_numeric($value))
      {
          $this-&gt;_error(self::NON_E_NUMERO, $value);
          return false;
      }
      else
          return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>the form i don't know how to do it, i use this but obviously it doesn't work</p>
  
  <pre><code>$sconto = $this-&gt;createElement('text','sconto')-&gt;setLabel('sconto');
  //-&gt;setValidators(array(new Gestionale_Validator_Float()));
  $this-&gt;addElement($sconto);
  ...
  $sconto-&gt;setDecorators(array(//no ViewHelper
              'Errors',
              'Description',
              array(array('data' =&gt; 'HtmlTag'), array('tag' =&gt; 'td', /*'class' =&gt; 'valore_campo', */'id'=&gt;'sconto')),
              array('TdLabel', array('placement' =&gt; 'prepend', 'class' =&gt; 'nome_campo'))
      ));
  </code></pre>