You are here

function feeds_ui_create_form_validate in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form_validate()
  2. 7.2 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form_validate()
  3. 7 feeds_ui/feeds_ui.admin.inc \feeds_ui_create_form_validate()

Validation handler for feeds_build_create_form().

File

feeds_ui/feeds_ui.admin.inc, line 188
Contains all page callbacks, forms and theming functions for Feeds administrative pages.

Code

function feeds_ui_create_form_validate($form, &$form_state) {
  ctools_include('export');
  if (ctools_export_load_object('feeds_importer', 'conditions', array(
    'id' => $form_state['values']['id'],
  ))) {
    form_set_error('id', t('Id is taken.'));
  }
  if (!empty($form_state['values']['id'])) {
    $importer = feeds_importer($form_state['values']['id']);
    $importer
      ->configFormValidate($form_state['values']);
  }
}