/**
  * Get an error message for a form element
  * @param name - the form element to get an error message for
  * @return string - the error message if one exists
  * @access public
  * @static 
  */
 public static function message($name)
 {
     if (isset(FormErrors::current()->errors[$name])) {
         $ret = FormErrors::current()->errors[$name];
     } else {
         $ret = '';
     }
     return $ret;
 }
Exemplo n.º 2
0
 public function formError($name)
 {
     return FormErrors::current()->message($name);
 }