You are here

function ad_admin_ads_validate in Advertisement 5.2

Same name and namespace in other branches
  1. 5 ad.module \ad_admin_ads_validate()
  2. 6.3 ad.admin.inc \ad_admin_ads_validate()
  3. 6 ad.admin.inc \ad_admin_ads_validate()
  4. 6.2 ad.admin.inc \ad_admin_ads_validate()
  5. 7 ad.admin.inc \ad_admin_ads_validate()

Must select an ad if performing an operation.

File

./ad.module, line 1556
An advertising system for Drupal powered websites.

Code

function ad_admin_ads_validate($form_id, $form_values) {
  $ads = array_filter($form_values['ads']);
  if (count($ads) == 0) {
    form_set_error('', t('No ads selected.'));
  }
}