In which case, it’s easier to create a public attribute in your class and to use a compare rule. There’s an example a little way down in this section of the guide.
The attribute:
public $verifyPassword;
The rule:
public function rules()
{
return array (
// ... some rules ...
array('verifyPassword', 'compare', 'compareAttribute'=>'password', 'on'=>'relevantScenarios'),
// ... some more rules ...
);
}