在我的表单中,我试图验证用户是否两次都填写了相同的值(以确保他们没有犯错)。我认为这Zend_Validate_Identical
就是用途,但我不太确定如何使用它。这是我到目前为止所得到的:
$this->addElement('password', 'password', array(
'label' => 'Password:',
'required' => true,
'validators' => array(
'Identical' => array(What do I put here?)
)
));
$this->addElement('password', 'verifypassword', array(
'label' => 'Verify Password:',
'required' => true,
'validators' => array(
'Identical' => array(What do I put here?)
)
));
我在这两个元素上都需要它吗?我在数组中放了什么?