You are here

public function InstagramFeedsPluginsPager::configFormValidate in Instagram Feeds 7

Override of parent::configFormValidate().

File

modules/instagram_feeds_plugins/plugins/feeds/InstagramFeedsPluginsPager.inc, line 199
Home of the InstagramFeedsPluginsPager.

Class

InstagramFeedsPluginsPager
Fetches data via Instagram API with the ability to page all results.

Code

public function configFormValidate(&$values) {
  parent::configFormValidate($values);

  // Make sure the max pages is numeric.
  if (!is_numeric($values['max_pages']) || $values['max_pages'] < 0) {
    form_set_error('max_pages', t('The maximum pages must be a number of zero or greater.'));
  }
  if (!is_numeric($values['number_of_images']) || $values['number_of_images'] < 0) {
    form_set_error('number_of_images', t('The amount of images must be a number of zero or greater.'));
  }
}