How to validate a field of Zend_Form based on the value of another field?
I'm trying to add a custom validator to a field. It should take into account the value of another field. E.g. field A should be at most B+50%. I've made a class implementing Zend_Validate_Interface , but apparently Zend Form only sends in the value of the current field to the validator. How do I make the validator receive everything? When you call isValid on a Zend_Form it will pass the all the data you passed to the method $form->isValid(array('a' => 1, 'b' => 2)); Your custom validator will receive that whole array of raw values. Example Validator class My_Validator_TwoVals implements Zend