function _inline_form_errors_set_errors

Same name in other branches
  1. 9 core/modules/inline_form_errors/inline_form_errors.module \_inline_form_errors_set_errors()
  2. 8.9.x core/modules/inline_form_errors/inline_form_errors.module \_inline_form_errors_set_errors()
  3. 11.x core/modules/inline_form_errors/inline_form_errors.module \_inline_form_errors_set_errors()

Populates form errors in the template.

4 calls to _inline_form_errors_set_errors()
inline_form_errors_preprocess_datetime_wrapper in core/modules/inline_form_errors/inline_form_errors.module
Implements hook_preprocess_HOOK() for datetime form wrapper templates.
inline_form_errors_preprocess_details in core/modules/inline_form_errors/inline_form_errors.module
Implements hook_preprocess_HOOK() for details element templates.
inline_form_errors_preprocess_fieldset in core/modules/inline_form_errors/inline_form_errors.module
Implements hook_preprocess_HOOK() for fieldset element templates.
inline_form_errors_preprocess_form_element in core/modules/inline_form_errors/inline_form_errors.module
Implements hook_preprocess_HOOK() for form element templates.

File

core/modules/inline_form_errors/inline_form_errors.module, line 68

Code

function _inline_form_errors_set_errors(&$variables) {
    $element = $variables['element'];
    if (!empty($element['#errors']) && empty($element['#error_no_message'])) {
        $variables['errors'] = $element['#errors'];
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.