You are here

function ad_admin_ads_validate in Advertisement 6

Same name and namespace in other branches
  1. 5.2 ad.module \ad_admin_ads_validate()
  2. 5 ad.module \ad_admin_ads_validate()
  3. 6.3 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.admin.inc, line 210
Advertisement admin pages and functions.

Code

function ad_admin_ads_validate($form, &$form_state) {
  $ads = array_filter($form_state['values']['ads']);
  if (count($ads) == 0) {
    form_set_error('', t('No ads selected.'));
  }
}