I add this class to library/My/Validate/PasswordConfirmation.php
There is a bettter way to do that. In your form put the identical validator on the confirmation passoword field, and then just overwrite $form->isValid() method to set the value to be validated:
public function __construct($options = NULL)
{
// ...
$confirm->addValidator('Identical');
// ...
}
public function isValid($data)
{
$confirm = $this->getElement('confirm_password');
$confirm->getValidator('Identical')->setToken($data['password']);
return parent::isValid($data);
}