rendered paste body<?php
class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract
{
const NOT_MATCH = 'notMatch';
protected $_mustEqual;
protected $_messageTemplates = array(
self::NOT_MATCH => 'Password confirmation does not match'
);
public function setMustEqual($value)
{
$this->_mustEqual = (string) $value;
}
public function isValid($value)
{
$value = (string) $value;
$this->_setValue($value);
if ($value !== $value) {
$this->_error(self::NOT_MATCH);
return false;
}
return true;
}
}