You are here

function cmf_admin_comments_form_validate in Content Management Filter 5

Same name and namespace in other branches
  1. 6.2 comment.inc \cmf_admin_comments_form_validate()
  2. 6 comment.inc \cmf_admin_comments_form_validate()
  3. 7 comment.inc \cmf_admin_comments_form_validate()

Form validation before submit. \n We can't execute any 'Update options' if no comments were selected.

Parameters

the ID of the passed form:

array with the form properties values:

See also

cmf_admin_comments_form()

cmf_admin_comments_form_submit()

File

./comment.inc, line 100
Content management filter module file

Code

function cmf_admin_comments_form_validate($form_id, $form_values) {
  $form_values['comments'] = array_diff($form_values['comments'], array(
    0,
  ));
  if (count($form_values['comments']) == 0) {
    form_set_error('', t('No items selected.'));
    drupal_goto('admin/content/filter');
  }
}