title: Yii2 save model to database
body: <p>I'm trying to do simple CRUD application with Yii2, but when I'm trying to save data, no validation errors appears and <code>$model-&gt;validate()</code> returns false. Here's my code:</p>
  
  <pre><code>public function actionCreate()
  {
      $model = new Game();
      if($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;save())
      {
          $this-&gt;redirect(['game-list']);
      }
      return $this-&gt;render('create', ['model' =&gt; $model]);
  }
  </code></pre>
  
  <p>So, <code>$model-&gt;load()</code> returns true and here is my <code>rules()</code> in my model:</p>
  
  <pre><code>public function rules()
  {
      return [
          [['title', 'subtitle', 'description'], 'required'],
          [['id_type', 'is_active', 'picture'], 'default'],
      ];
  }
  </code></pre>
  
  <p>I have seven columns in DB (this 6 + id as a primary key). I will be glad if anyone help me.</p>
  
  <p><strong>UPD:</strong>
  View:</p>
  
  <pre><code>&lt;? $form = ActiveForm::begin(array('options' =&gt; array('class' =&gt; 'form-horizontal'))); ?&gt;
  &lt;?= $form-&gt;errorSummary($model); ?&gt;
  &lt;?= $form-&gt;field($model, 'title')-&gt;textInput(); ?&gt;
  &lt;?= $form-&gt;field($model, 'subtitle')-&gt;textInput(); ?&gt;
  &lt;?= $form-&gt;field($model, 'description')-&gt;textInput(); ?&gt;
  &lt;div class="form-actions"&gt;
      &lt;?= Html::submitButton(Yii::t('app', $model-&gt;isNewRecord ? 'Create' : 'Update')); ?&gt;
  &lt;/div&gt;
  &lt;? ActiveForm::end(); ?&gt;
  </code></pre>