I’m using Zend_Form. Why is the clearValidators() line not working in this example?
$element = $form->getElement('field1');
$element->clearValidators();
var_dump($element->isValid(''));
print_r($element->getErrors());
Outputs
bool(false)
Array
(
[0] => isEmpty
)
There is the possibility of having an allowEmpty flag on an element. Try: