node_admin_nodes_validate

Versions
4.7
node_admin_nodes_validate($form_id, $edit)
5
node_admin_nodes_validate($form_id, $form_values)
6 – 7
node_admin_nodes_validate($form, &$form_state)

Validate node_admin_nodes form submissions.

Check if any nodes have been selected to perform the chosen 'Update option' on.

Code

modules/node/node.admin.inc, line 509

<?php
function node_admin_nodes_validate($form, &$form_state) {
  $nodes = array_filter($form_state['values']['nodes']);
  if (count($nodes) == 0) {
    form_set_error('', t('No items selected.'));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.