You are here

function paymentform_field_widget_error in Payment 7

Implements hook_field_widget_error().

File

modules/paymentform/paymentform.module, line 166
Hook implementations and general functions.

Code

function paymentform_field_widget_error($element, $error, $form, &$form_state) {

  // This is a form-element specific error.
  if (isset($error['delta']) && isset($error['property'])) {
    form_error($element['line_item']['container_' . $error['delta']][$error['property']], $error['message']);
  }
  else {
    form_error($element['line_item'], $error['message']);
  }
}