In a book on the Zend Framework I have come across a custom validator for unique email addresses. The validator extends Zend_Validate_Abstract and therefore implements the isValid() interface.
In the interface the method signature is isValid($value). In the concrete class, it's isValid($value, $context = null).
The author explains that the $context variable contains the $_POST array and he relies on values from the array in the method's implementation. When I try to reproduce the code, however, my $context array is null. Furthermore, I am unable to find any reference to $context in the Zend_Validation reference guide, or to passing in the $_POST values.
Has anyone else come across this?
BTW, the book is Zend Framework 1.8 Web Application Development by Keith Pope.
Thanks!