title: yii 2.0 on ajax submit error Class 'app\controllers\ActiveForm' not found
body: <p>I have the following error</p>
  
  <blockquote>
    <p>Class 'app\controllers\ActiveForm' not found</p>
  </blockquote>
  
  <p>when submit the following <code>ActiveForm</code> (kartik\widgets\ActiveForm)</p>
  
  <pre><code>$form = ActiveForm::begin([
      'type'=&gt;ActiveForm::TYPE_VERTICAL,
      'action' =&gt; 'incarico/update/'.$model-&gt;id,
      'enableAjaxValidation' =&gt; true,
      'enableClientValidation' =&gt; false,
  ]);
  </code></pre>
  
  <p>My controller has this action:</p>
  
  <pre><code>public function actionUpdate($id)
  {
  
      $model = $this-&gt;findModel($id);
  
      if (Yii::$app-&gt;request-&gt;isAjax &amp;&amp; $model-&gt;load(Yii::$app-&gt;request-&gt;post())) {
          Yii::$app-&gt;response-&gt;format = Response::FORMAT_JSON;
          return ActiveForm::validate($model);
      } else {
          return $this-&gt;render('update', [
              'model' =&gt; $model,
          ]);
      }
  
  }
  </code></pre>
  
  <p>The error refers to this line</p>
  
  <pre><code>return ActiveForm::validate($model);
  </code></pre>