form_error

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 form_error(&$element, $message = '')

Flag an element as having an error.

Verwandte Themen

▾ 6 functions call form_error()

aggregator_categorize_items_validate in modules/aggregator/aggregator.pages.inc
Validate aggregator_categorize_items form submissions.
date_validate in includes/form.inc
Validates the date type to stop dates like February 30, 2006.
filter_form_validate in modules/filter/filter.module
Validation callback for filter elements in a form.
install_configure_form_validate in ./install.php
Form API validate for the site configuration form.
password_confirm_validate in includes/form.inc
Validate password_confirm element.
_form_validate in includes/form.inc
Performs validation on form elements. First ensures required fields are completed, #maxlength is not exceeded, and selected options were in the list of options given to the user. Then calls user-defined validators.

Code

includes/form.inc, line 848

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

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen