You are here

function form_error in Drupal 4

Same name and namespace in other branches
  1. 5 includes/form.inc \form_error()
  2. 6 includes/form.inc \form_error()
  3. 7 includes/form.inc \form_error()

Flag an element as having an error.

Related topics

5 calls to form_error()
aggregator_page_list_validate in modules/aggregator.module
date_validate in includes/form.inc
Validates the FAPI date type to stop dates like 30/Feb/2006
filter_form_validate in modules/filter.module
password_confirm_validate in includes/form.inc
Validate password_confirm element.
_form_validate in includes/form.inc

File

includes/form.inc, line 321

Code

function form_error(&$element, $message = '') {
  $element['#error'] = TRUE;
  form_set_error(implode('][', $element['#parents']), $message);
}