我在Zend表单中有两个字段,我想应用验证规则以确保用户只需输入其中一个字段。
$companyname = new Zend_Form_Element_Text('companyname');
$companyname->setLabel('Company Name');
$companyname->setDecorators($decors);
$this->addElement($companyname);
$companyother = new Zend_Form_Element_Text('companyother');
$companyother->setLabel('Company Other');
$companyother->setDecorators($decors);
$this->addElement($companyother);
我如何添加一个验证器,可以同时检查两个字段?