original_string: public function error($field, $text = null)
      {
          /** @type Form_Field $form_field */
          $form_field = $this->getElement($field);
          $form_field->displayFieldError($text);
      }
code: public function error($field, $text = null)
      {
          /** @type Form_Field $form_field */
          $form_field = $this->getElement($field);
          $form_field->displayFieldError($text);
      }
code_tokens: public function error ( $ field , $ text = null ) { /** @type Form_Field $form_field */ $ form_field = $ this -> getElement ( $ field ) ; $ form_field -> displayFieldError ( $ text ) ; }
docstring: Adds error message to form field.
  
  @param string $field
  @param string $text
docstring_tokens: Adds error message to form field .