you should use this:
array('Identical', $variable)
if you set 'test', the validator compares text from your input field with the 'test' word
if you have input field named 'test', you should write something like that:
array('Identical', $this->getRequest()->getParam('test'))
in other words:
Code:
//password entered in the form
$password = $this->getRequest()->getParam('password');
//repeat password field in your form
$form->addElement('password', 'repeat_password',
array(
//...
'validators' => array(
//...
array('Identical', $password)