Model password confirmation field.

Comparing #3 with #4

Revision #4 was created by PashaL PashaL on Jul 4, 2012, 4:40:56 AM.

Had 'update' scenario in rules() where wiki describes instance in which password fields are required in 'insert" but not 'update' scenarios.

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'=>'
update, insert'),
array('password, repeat_password', 'length', 'min'=>6, 'max'=>40),
array('password', 'compare', 'compareAttribute'=>'repeat_password'),

);
}
[...]