You are here

function spam_comment_overview_validate in Spam 5

Form API hook; validate spam_comment_overview() form.

File

./spam.module, line 2721

Code

function spam_comment_overview_validate($form_id, $form_values) {
  $form_values['comments'] = array_diff($form_values['comments'], array(
    0,
  ));
  if (count($form_values['comments']) == 0) {
    form_set_error(NULL, t('Please select one or more comments to perform the update on.'));
    return 'admin/content/comment/list/spam';
  }
}