title: Yii form validations: comparing password with a field that does not exists in DB
body: <p>I am new to Yii framework. I want to validate a password field with the repeated value. I use the following rule:</p>
  
  <pre><code>array('password', 'compare', 'compareAttribute'=&gt;'password2', 'on'=&gt;'register'),
  </code></pre>
  
  <p>But I receive this error:</p>
  
  <pre><code>Property "Users.password2" is not defined
  </code></pre>
  
  <p>How can I fix this problem without creating redundant field <em>password2</em> in the DB?</p>