1 link.module link_field_widget_error($element, $error, $form, &$form_state)

Implements hook_field_widget_error().

File

core/modules/link/link.module, line 395
Defines simple link field types.

Code

function link_field_widget_error($element, $error, $form, &$form_state) {
  if ($error['error_element']['title']) {
    form_error($element['title'], $error['message']);
  }
  elseif ($error['error_element']['url']) {
    form_error($element['url'], $error['message']);
  }
}