function form_has_errors

6.x render.inc form_has_errors()
4.x forms.inc form_has_errors()
5.x render.inc form_has_errors()

Returns TRUE or FALSE if there have been errors for this form submission (We will just look in the SESSION to find out).

2 calls to form_has_errors()
fp_render_form in includes/render.inc
Render the form array from the callback to the screen, and set the form to save itself in our default submit handler. Valid form_types are: "system_settings" => values automatically saved to variables table. "normal" or BLANK…
system_handle_form_submit in modules/system/system.module
Intercepts form submissions from forms built with the form API.

File

includes/render.inc, line 471

Code

function form_has_errors() {

  if (!isset($_SESSION ["fp_form_errors"]) || !is_array($_SESSION ["fp_form_errors"])) {
    return FALSE;
  }

  if (@count($_SESSION ["fp_form_errors"]) > 0) {
    return TRUE;
  }

  return FALSE;
}