1 text.module text_field_widget_error($element, $error, $form, &$form_state)

Implements hook_field_widget_error().

File

core/modules/field/modules/text/text.module, line 634
Defines simple text field types.

Code

function text_field_widget_error($element, $error, $form, &$form_state) {
  switch ($error['error']) {
    case 'text_summary_max_length':
      $error_element = $element[$element['#columns'][1]];
      break;

    default:
      $error_element = $element[$element['#columns'][0]];
      break;
  }

  form_error($error_element, $error['message']);
}