title: cakephp $this->validates multiple recode set many
body: <p>I am trying to validate dynamically added controls on the form. I have a registration form where I have an option for users to add 1 to 5 education info. I am using Jquery to handle add remove fields.</p>
  
  <p>HTML Code</p>
  
  <pre><code>&lt;input name="data[Usereducation][0][schoolname]" id="Usereducation0Schoolname" type="text"&gt;
  &lt;input name="data[Usereducation][1][schoolname]" id="Usereducation1Schoolname" type="text"&gt;
  ...................
  </code></pre>
  
  <p>On submission this generates the array as..</p>
  
  <pre><code>Array ( [0] =&gt; Array ( [schoolname] =&gt; ) [1] =&gt; Array ( [schoolname] =&gt; ) [3] =&gt; Array ( [schoolname] =&gt; ) 
  </code></pre>
  
  <p>My modal has following validation.</p>
  
  <pre><code>public $validate = array(
      'schoolname'=&gt;array(
              'School Name'=&gt;array(
                  'rule'=&gt;'notEmpty',
                  'message'=&gt;'Please enter your School Name.'
              )
          )           
      );
  </code></pre>
  
  <p>In the controller I am trying to validate these with <code>$this-&gt;Usereducation-&gt;validates();</code></p>
  
  <p>But nothing happens. Any suggestions on how to handle this?</p>