You are here

function menu_link_field_widget_error in Menu Link (Field) 7

Implements hook_field_widget_error().

File

./menu_link.field.inc, line 659
Defines a menu link field type.

Code

function menu_link_field_widget_error($element, $error, $form, &$form_state) {
  switch ($error['error']) {
    case 'menu_link_invalid_parent':
      $error_element = $element['parent'];
      break;
    default:
      $error_element = $element['link_title'];
      break;
  }
  form_error($error_element, $error['message']);
}