You are here

function physical_field_widget_error in Physical Fields 7

Implements hook_field_widget_error().

File

./physical.module, line 116
Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.

Code

function physical_field_widget_error($element, $error, $form, &$form_state) {
  if ($error['error'] == 'physical_volume') {
    form_error($element['volume'], $error['message']);
  }
  elseif ($error['error'] == 'physical_weight') {
    form_error($element['weight'], $error['message']);
  }
  elseif ($error['error'] == 'physical_dimensions') {
    form_error($element[$error['dimension']], $error['message']);
  }
}