public function error($field, $text = null)
    {
        /** @type Form_Field $form_field */
        $form_field = $this->getElement($field);
        $form_field->displayFieldError($text);
    }
public function error($field, $text = null)
    {
        /** @type Form_Field $form_field */
        $form_field = $this->getElement($field);
        $form_field->displayFieldError($text);
    }
public function error ( $ field , $ text = null ) { /** @type Form_Field $form_field */ $ form_field = $ this -> getElement ( $ field ) ; $ form_field -> displayFieldError ( $ text ) ; }
Adds error message to form field.

@param string $field
@param string $text
Adds error message to form field .