1 form.inc form_error(&$element, $message = '')

Flags an element as having an error.

Related topics

File

core/includes/form.inc, line 1751
Functions for form and batch generation and processing.

Code

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