You are here

function link_field_widget_error in Link 7

Implements hook_field_widget_error().

File

./link.module, line 424
Defines simple link field types.

Code

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