function tripal_field_widget_form_validate

3.x tripal.fields.inc tripal_field_widget_form_validate($element, &$form_state, $form)
1 string reference to 'tripal_field_widget_form_validate'
TripalFieldWidget::form in tripal/includes/TripalFields/TripalFieldWidget.inc
Provides the form for editing of this field.

File

tripal/includes/tripal.fields.inc, line 745

Code

function tripal_field_widget_form_validate($element, &$form_state, $form) {
  $field = $element['#field'];
  $instance = $element['#instance'];

  $langcode = $element['#language'];
  $delta = $element['#delta'];

  $widget_class = $instance['widget']['type'];
  tripal_load_include_field_class($widget_class);
  if (class_exists($widget_class)) {
    $widget = new $widget_class($field, $instance);
    $widget->validate($element, $form, $form_state, $langcode, $delta);
  }
}