title: Weird captcha in Yii popup
body: <p>I have a problem with captcha in my YII project. I included a captcha in popup form. It's showing correctly, but there's a problem with the validation. The validation is true sometimes, if we entered the correct word in first attempt, the validation says it is wrong, after generating another code the validation succeeds. Why?</p>
  
  <p>In model-> rules:</p>
  
  <pre><code>array('verifyCode', 'captcha', 'allowEmpty'=&gt;!CCaptcha::checkRequirements(),'on'=&gt; 'signup')
  </code></pre>
  
  <p>In controller -> calling the signup form via renderPartial</p>
  
  <pre><code>$this-&gt;renderPartial('signUp',array('model'=&gt;$model),false,true);
  </code></pre>
  
  <p>In view :</p>
  
  <pre><code>&lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
      'id'=&gt;'sign-up-form',
      'enableAjaxValidation'=&gt;true,
      'enableClientValidation'=&gt;true,
      'clientOptions'=&gt;array(
          'validateOnSubmit'=&gt;true,
      ),
  )); ?&gt;
  
  -----------------------
  -----------------------
  
  &lt;?php if(CCaptcha::checkRequirements()): ?&gt;                             
      &lt;?php echo $form-&gt;labelEx($model, 'verifyCode', array('for'=&gt;'User_security_code')); ?&gt;
      &lt;?php $this-&gt;widget('CCaptcha'); ?&gt;     
      &lt;?php echo $form-&gt;textField($model,'verifyCode',array('class'=&gt;'txt-style width-289')); ?&gt;
      Please enter the letters as they are shown in the image above. Letters are not case-sensitive.
      &lt;?php echo $form-&gt;error($model,'verifyCode',array('class'=&gt;'error_msg')); ?&gt;
   &lt;?php endif; ?&gt;    
  </code></pre>