You are here

function timefield_field_widget_error in Timefield 7

Implements hook_field_widget_error().

File

./timefield.module, line 649
Defines a Field API field for time

Code

function timefield_field_widget_error($element, $error, $form, &$form_state) {
  switch ($error['error']) {
    case 'timefield_invalid_value':
      form_error($element['value'], $error['message']);
      break;
    case 'timefield_invalid_value2':
      form_error($element['value2'], $error['message']);
      break;
    default:
      form_error($element, $error['message']);
      break;
  }
}