title: Yii validate multiple instances of same model
body: <p>i have multiple instances of same model in one form (mainly for languages entries).</p>
  
  <p>In actionCreate:</p>
  
  <pre><code>$model1 = new ContentCategoryNames();
  $model2 = new ContentCategoryNames();
  $model = new ContentCategory;
  
  $this-&gt;performAjaxValidation([$model1, $model2]);
  </code></pre>
  
  <p>In view:</p>
  
  <pre><code>echo $form-&gt;labelEx($model1, '[1]name');
  echo $form-&gt;textField($model1, '[1]name');
  echo $form-&gt;error($model1, '[1]name');
  
  echo $form-&gt;labelEx($model2, '[2]name');
  echo $form-&gt;textField($model2, '[2]name');
  echo $form-&gt;error($model2, '[2]name');
  </code></pre>
  
  <p>And it generates all fields with ids like <code>ContentCategoryNames_1_name</code>, <code>ContentCategoryNames_1_name_em_</code> and so on. This is fine, but when i try to make ajax validation, i get response: <code>{"ContentCategoryNames_name":["Name cannot be blank."]}</code> - without sequence number (it must be <code>"ContentCategoryNames_1_name":/*...*/</code>). What am i missing?</p>
  
  <p>Taking steps from <a href="http://www.yiiframework.com/wiki/362/how-to-use-multiple-instances-of-the-same-model-in-the-same-form/" rel="nofollow">here</a></p>