You are here

function cmf_admin_both_form_validate in Content Management Filter 5

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

Form validation before submit. \n 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:

See also

cmf_admin_both_form()

cmf_admin_both_form_submit()

File

./both.inc, line 143
Content management filter module file

Code

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