You are here

function royalsliderfield_field_widget_error in RoyalSlider Integration 7

Implements hook_field_widget_error().

See also

royalsliderfield_field_validate()

form_error()

File

contrib/royalsliderfield/royalsliderfield.module, line 241
RoyalSlider Field module.

Code

function royalsliderfield_field_widget_error($element, $error, $form, &$form_state) {
  if (isset($error) && count($error)) {
    foreach ($error as $err) {
      switch ($err['error']) {
        case 'royalsliderfields_image':
          form_error($element['rs_image'], $err['message']);
          break;
        case 'royalsliderfields_content':
          form_error($element['rs_content'], $err['message']);
          break;
      }
    }
  }
}