title: Repeat Password does not work in Yii2
body: <p>I have written rules in the model as:</p>
  
  <pre><code>    public $password_repeat;
  
  /**
   * @inheritdoc
   */
  public function rules()
  {
      return [
          ....
          ....  
          ['password', 'required'],
          ['password', 'string', 'min' =&gt; 6],
          ['password_repeat', 'compare', 'compareAttribute'=&gt;'password', 'message'=&gt;"Passwords don't match" ],
      ];
  }
  </code></pre>
  
  <p>If I use different password in <code>Password</code> and <code>Password Repeat</code> field, it gives error. So, that's mean it works. But problem is that, it does not give any error if <code>Password Repeat</code> field is empty.</p>