You are here

function geolocation_field_widget_error in Geolocation Field 7

Implements hook_field_widget_error().

File

./geolocation.module, line 298
A geolocation field using the Field API.

Code

function geolocation_field_widget_error($element, $error, $form, &$form_state) {
  switch ($error['error']) {
    case 'geolocation_invalid_lat':
      form_error($element['lat'], $error['message']);
      break;
    case 'geolocation_invalid_lng':
      form_error($element['lng'], $error['message']);
      break;
  }
}