zend framework 2 - compare 2 inputs using validator?
问题 I'm new to zend framework 2 and I have a question on comparing two inputs in the factory-backed form. My scenario is like following: I want to compare two inputs, for example, $startDate and $endDate . I want to validate that $startDate is always less than $endDate . How I'm going to do this? For example: $inputFilter->add($factory->createInput(array( 'name' => 'startDate', 'required' => true, 'validators' => array( array( 'name' => 'LessThan', 'options' => array( 'max' => $endDate, ), ), ),