You are here

function spam_admin_overview_validate in Spam 6

Same name and namespace in other branches
  1. 5.3 spam.module \spam_admin_overview_validate()

Required to select something.

File

./spam.module, line 1377
Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.

Code

function spam_admin_overview_validate($form, &$form_state) {
  $spam = array_filter($form_state['values']['spam']);
  if (count($spam) == 0) {
    form_set_error('', t('You have not selected any spam content.'));
  }
}