You are here

public function ctools_export_ui::edit_finish_validate in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui::edit_finish_validate()

Perform a final validation check before allowing the form to be finished.

File

plugins/export_ui/ctools_export_ui.class.php, line 1124

Class

ctools_export_ui
Base class for export UI.

Code

public function edit_finish_validate(&$form, &$form_state) {
  if ($form_state['op'] != 'edit') {

    // Validate the export key. Fake an element for form_error().
    $export_key = $this->plugin['export']['key'];
    $element = array(
      '#value' => $form_state['item']->{$export_key},
      '#parents' => array(
        $export_key,
      ),
    );
    $form_state['plugin'] = $this->plugin;
    ctools_export_ui_edit_name_validate($element, $form_state);
  }
}