title: captcha doen't validate in yii2
body: <p>tips : username and email is check by ajaxValidation with validate method.</p>
  
  <p>all is correct but i guess captcha is changed in server but the old picture is in client.</p>
  
  <p>i googling alot no result found.</p>
  
  <p>this is view:</p>
  
  <pre><code>&lt;?php
      $form = \yii\widgets\ActiveForm::begin([
                  'id' =&gt; 'form-signup',
                  'action' =&gt; 'signup',
                  'enableAjaxValidation' =&gt; false,
                  'enableClientValidation' =&gt; true,
                  'validationUrl' =&gt; 'validation',
                  'validateOnBlur' =&gt; true,
                  'fieldConfig' =&gt; [
                      'template' =&gt; '&lt;div class="col-md-4" &gt;{label}{input}{error}&lt;/div&gt;'
                  ]
      ]);
      ?&gt;
  
      &lt;?= $form-&gt;field($signup, 'username', ['enableAjaxValidation' =&gt; true]) ?&gt;
      &lt;?= $form-&gt;field($signup, 'name') ?&gt;
      &lt;?= $form-&gt;field($signup, 'family') ?&gt;
      &lt;?= $form-&gt;field($signup, 'mobile') ?&gt;
      &lt;?= $form-&gt;field($signup, 'password')-&gt;passwordInput() ?&gt;
      &lt;?= $form-&gt;field($signup, 'password_repeat')-&gt;passwordInput() ?&gt;
      &lt;?= $form-&gt;field($signup, 'email', ['enableAjaxValidation' =&gt; true]) ?&gt;
      &lt;?= $form-&gt;field($signup, 'verifyCode', ['enableAjaxValidation' =&gt; false])-&gt;widget(yii\captcha\Captcha::className()) ?&gt;
      &lt;div class="form-group"&gt;
          &lt;?= yii\helpers\Html::submitButton('signup', ['class' =&gt; 'btn btn-green margin-right', 'name' =&gt; 'signup-button']) ?&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>        $model = new SignupForm();
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post())) {
          if ($model-&gt;validate()) {
              if ($user = $model-&gt;signup()) {
                  if (Yii::$app-&gt;getUser()-&gt;login($user)) {
                      return $this-&gt;goHome();
                  }
              }
          } else {
      ;
              \yii\widgets\ActiveForm::validate($model);
          }
      } else {
          return $this-&gt;render('/partials/_signup', ['signup' =&gt; $model]);
      }
  </code></pre>
  
  <p>ajax validation controller method:</p>
  
  <pre><code>  public function actionValidation() {
      $model = new SignupForm();
      if (Yii::$app-&gt;request-&gt;isAjax &amp;&amp; $model-&gt;load(Yii::$app-&gt;request-&gt;post())) {
          Yii::$app-&gt;response-&gt;format = 'json';
          return \yii\widgets\ActiveForm::validate($model);
      }
  }
  </code></pre>
  
  <p>model:</p>
  
  <pre><code> public $name;
  public $family;
  public $mobile;
  public $username;
  public $email;
  public $password;
  public $password_repeat;
  public $verifyCode;
  
     public function rules() {
      return [
          [['name', 'family', 'mobile'], 'default'],
          ['name', 'string', 'max' =&gt; 50],
          ['family', 'string', 'max' =&gt; 50],
          ['mobile', 'string', 'max' =&gt; 11],
          ['username', 'filter', 'filter' =&gt; 'trim'],
          ['username', 'required'],
          ['username', 'string', 'min' =&gt; 2, 'max' =&gt; 255],
          [['username'], 'unique', 'targetClass' =&gt; '\frontend\models\User', 'message' =&gt; 'username already taken.'],
          ['email', 'filter', 'filter' =&gt; 'trim'],
          ['email', 'required'],
          ['email', 'email'],
          ['email', 'string', 'max' =&gt; 255],
          ['email', 'unique', 'targetClass' =&gt; '\frontend\models\User', 'message' =&gt; 'email name already taken.'],
          ['password', 'required'],
          ['password', 'string', 'min' =&gt; 6, 'max' =&gt; 255],
          ['password_repeat', 'string', 'min' =&gt; 6, 'max' =&gt; 255],
          ['password_repeat', 'compare', 'compareAttribute' =&gt; 'password'],
          ['verifyCode', 'captcha'],
      ];
  }
  </code></pre>
  
  <p><b>there is no behaviour in controller</b></p>