function cmf_admin_both_form_validate in Content Management Filter 6
Same name and namespace in other branches
- 5 both.inc \cmf_admin_both_form_validate()
- 6.2 both.inc \cmf_admin_both_form_validate()
- 7 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:
See also
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');
}
}