You are here

function cmf_admin_both_form_validate in Content Management Filter 7

Same name and namespace in other branches
  1. 5 both.inc \cmf_admin_both_form_validate()
  2. 6.2 both.inc \cmf_admin_both_form_validate()
  3. 6 both.inc \cmf_admin_both_form_validate()

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

Parameters

the ID of the passed form:

array with the form properties values:

File

./both.inc, line 160
@brief Content management filter "both" operations file

Code

function cmf_admin_both_form_validate($form, &$form_state) {
  $form_state['values']['objects'] = array_diff($form_state['values']['objects'], array(
    0,
  ));
  if (count($form_state['values']['objects']) == 0) {
    form_set_error('', t('No items selected.'));
    drupal_goto('admin/content/filter');
  }
}