You are here

function feed_import_add_new_feed_form_validate in Feed Import 7.2

Same name and namespace in other branches
  1. 7 feed_import.module \feed_import_add_new_feed_form_validate()

Add new feed form validate

File

./feed_import.module, line 906
User interface, cron functions for feed_import module

Code

function feed_import_add_new_feed_form_validate($form, &$form_state) {
  $feeds = FeedImport::loadFeeds();
  if (is_numeric($form_state['values']['machine_name']) || is_numeric($form_state['values']['machine_name'][0])) {
    form_error($form['machine_name'], t('Machine name must be not numeric!'));
  }
  if (isset($feeds[$form_state['values']['machine_name']])) {
    form_error($form['machine_name'], t('Feed machine name already exists!'));
  }
}