Model password confirmation field.

Comparing #1 with #4

Content

[...]
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
//password and repeat password
array('password, repeat_password', 'required', 'on'=>'
resetPassword, insert'),
array('password, repeat_password', 'length', 'min'=>6, 'max'=>40),
array('password', 'compare', 'compareAttribute'=>'repeat_password'),
[...]
Hope it helps :)
 
 
[Chinese Version](http://www.yiiwiki.com/wiki/view/id/20/title/%E6%A8%A1%E5%9E%8B%E4%B8%AD%E7%9A%84%E7%A1%AE%E8%AE%A4%E5%AF%86%E7%A0%81%E5%AD%97%E6%AE%B5 "")