title: Yii ajaxform validation only validates a part of the form
body: <p>I got a Yii form which collects data for three models. I am using ajaxvalidation, on change and on submit:</p>
  
  <pre><code>&lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
      'id'=&gt;'offer-form',
      'enableAjaxValidation'=&gt;true,
      'enableClientValidation'=&gt;true,
      'clientOptions' =&gt; array(
          'validateOnChange'=&gt;true,
          'validateOnSubmit'=&gt;true,
      )   
  )); ?&gt;
  </code></pre>
  
  <p>Now the problem is that that only the first three inputs are getting validated, code of these inputs:</p>
  
  <p>1:</p>
  
  <pre><code>&lt;div class="input-bg wide-input"&gt;
  
                      &lt;?php 
                      //fill this field after selecting newspaper
                      echo $form-&gt;hiddenField($newspaper, 'id'); ?&gt;
                      &lt;?php echo $form-&gt;textField($newspaper, 'name', array('maxlength' =&gt; 45, 'placeholder'=&gt;'Krantnaam')); ?&gt;
                      &lt;?php echo $form-&gt;error($newspaper, 'name', array('class'=&gt;'error')); ?&gt;
                  &lt;/div&gt;
                  &lt;a class="button gray-button"&gt;Aanbieden&lt;/a&gt;
  </code></pre>
  
  <p>2 and 3:</p>
  
  <pre><code>&lt;div class="input-bg linked-input"&gt;
                      &lt;?php echo $form-&gt;textField($address, 'postalcode', array('maxlength' =&gt; 45, 'placeholder'=&gt;'Postcode')) ?&gt;
                      &lt;?php echo $form-&gt;error($address, 'postalcode'); ?&gt;
                  &lt;/div&gt;
  
                  &lt;div class="input-bg linked-input"&gt;
                      &lt;?php echo $form-&gt;textField($address, 'street_number', array('maxlength' =&gt; 45, 'placeholder'=&gt;'Huisnummer')); ?&gt;
                      &lt;?php echo $form-&gt;error($address, 'street_number'); ?&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>Those three inputs serve for two models which are <code>$newspaper and $address</code>. Now the case is that those three inputs are perfectly validated(on change and on submit) where the other seven inputs are not validated, example of one of those inputs that are not validated:</p>
  
  <pre><code> &lt;div class="input-bg linked-input"&gt;
              &lt;?php echo $form-&gt;textField($offer, 'firstname', array('maxlength' =&gt; 45, 'placeholder'=&gt;'Voornaam')); ?&gt;
              &lt;?php echo $form-&gt;error($offer, 'firstname'); ?&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Finally, I will post my controller code:</p>
  
  <pre><code>$this-&gt;performAjaxValidation($offer, 'offer-form');
  $this-&gt;performAjaxValidation($address, 'offer-form');
  $this-&gt;performAjaxValidation($newspaper, 'offer-form');
  
  if(Yii::app()-&gt;getRequest()-&gt;getIsAjaxRequest()) {
      echo CActiveForm::validate( array($address));  
      echo CActiveForm::validate( array($offer));
      echo CActiveForm::validate( array($newspaper)); 
      print_r($_POST);
      die();
      //Yii::app()-&gt;end(); 
  }
  </code></pre>
  
  <p>If I am submitting or changing the form I do get back JSON with the errors for the fields that are not validated on the eye, but they don't get an error state.</p>
  
  <p>I hope there is someone that can see a mistake or anything else.</p>
  
  <p>Greetz,</p>