From the source code of Zend_Validate_Db_RecordExists (Version 1.12):
public function isValid($value)
{
$valid = true;
$this->_setValue($value);
$result = $this->_query($value);
if (!$result) {
$valid = false;
$this->_error(self::ERROR_NO_RECORD_FOUND);
}
return $valid;
}
So obviously $result
is a local variable and consequently it cannot be accessed later on. If you want to achieve that, you could simply write your own validator based Zend_Validate_Db_Abstract
.