You are here

function feed_import_import_feed_form_validate in Feed Import 7.3

Same name and namespace in other branches
  1. 7 feed_import.module \feed_import_import_feed_form_validate()
  2. 7.2 feed_import.module \feed_import_import_feed_form_validate()

Import form validate

1 string reference to 'feed_import_import_feed_form_validate'
feed_import_import_feed_form in ./feed_import.module
Import form

File

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

Code

function feed_import_import_feed_form_validate($form, &$form_state) {
  $code = trim($form_state['values']['code']);
  if (!$code || !($code = @json_decode($code, TRUE))) {
    form_error($form['code'], t('Invalid JSON code!'));
    return;
  }
  if (!is_array($code)) {
    form_error($form['code'], t('Invalid feed format!'));
    return;
  }
}