title: Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Getting unknown property: app\models\User::repeat_password'
body: <p>I am new in Yii framework. This is my first post in stackoverflow for related framework. My problem is how to show non model input field in the view page. Please check my controler and view code.</p>
  
  <h3>controllers</h3>
  
  <pre><code>public function actionRegister() {
      $model = new User();
      if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) &amp;&amp; $model-&gt;validate()) {
          //Insert data code here...
          return $this-&gt;render('entry-confirm', ['model' =&gt; $model]);
      } else {
          return $this-&gt;render('entry', ['model' =&gt; $model]);
      }
  }
  </code></pre>
  
  <h3>views(entry.php)</h3>
  
  <pre><code>&lt;?php
  
  use yii\helpers\Html;
  use yii\widgets\ActiveForm;
  ?&gt;
  &lt;?php $form = ActiveForm::begin(); ?&gt;
  
  &lt;?= $form-&gt;field($model, 'username') ?&gt;
  &lt;?= $form-&gt;field($model, 'email') ?&gt;
  &lt;?= $form-&gt;field($model, 'password')-&gt;passwordInput() ?&gt;
  &lt;?= $form-&gt;field($model, 'repeat_password')-&gt;passwordInput() ?&gt;
  
  &lt;div class="form-group"&gt;
  &lt;?= Html::submitButton('Submit', ['class' =&gt; 'btn btn-primary']) ?&gt;
  &lt;/div&gt;
  
  &lt;?php ActiveForm::end(); ?&gt;
  </code></pre>
  
  <h3>models(User.php)</h3>
  
  <pre><code>namespace app\models;
  
  use Yii;
  class User extends \yii\db\ActiveRecord {
  
      public static function tableName() {
          return 'user';
      }
  
      public function rules() {
          return [
              [['username', 'password', 'email'], 'required'],
              [['username', 'password', 'email'], 'string', 'max' =&gt; 128],
              ['email', 'email', 'message' =&gt; "The email isn't correct"],
              ['email', 'unique', 'message' =&gt; 'Email already exists!'],
  
              ['repeat_password', 'required'],
              [['repeat_password'], 'string', 'min'=&gt;6, 'max'=&gt;40],
              ['password', 'compare', 'compareAttribute'=&gt;'repeat_password'],
          ];
      }
  
      public function attributeLabels() {
          return [
              'id' =&gt; 'ID',
              'username' =&gt; 'Username',
              'password' =&gt; 'Password',
              'email' =&gt; 'Email',
          ];
      }
  
  }
  </code></pre>
  
  <h3>Output</h3>
  
  <p><a href="https://i.stack.imgur.com/Swb4o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Swb4o.png" alt="enter image description here"></a></p>
  
  <p>I have 3 column in my <code>user</code> table. Columns are <code>username</code>, <code>email</code> and <code>password</code> but <code>repeat_password</code> is not in my table column. This is a non model input field. So I am getting above error message. Please help me and let me know how to fix it.</p>