下面的代码不显示验证消息,我应该在任何地方打印任何变量。请指教。
$username = new Zend_Form_Element_Text('username', array('autocomplete' => 'off'));
$username->setLabel('Username')
->setDecorators($elementDecoration)
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty', true, array('messages'=>'Cannot be empty'));
$elementDecoration = array(
'ViewHelper',
'Description',
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td', 'placement' => 'prepend')),
array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
);