I have a zend form with a start- and an endate.
$form = new Zend_Form();
$form->setName($this->formName)
->setMethod('post');
$feStartdate = new Zend_Form_Element_Text('startdate');
$feEnddate = new Zend_Form_Element_Text('enddate');
$form->addElement($feStartDate)
->addElement($feEndDate)
->addElement('submit', 'submit', array('label' => 'Save'));
I assume I must write a custom validator for to check this. How would this custom validator look like and how can I call it? I assume something like
$feEnddate->addValidator('dateComesAfter', $feStartDate)