You are here

function state_flow_admin_nodes_validate in State Machine 7.2

Same name and namespace in other branches
  1. 7.3 modules/state_flow/state_flow.admin.inc \state_flow_admin_nodes_validate()

Validate node_admin_nodes form submissions.

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

1 string reference to 'state_flow_admin_nodes_validate'
state_flow_admin_nodes in modules/state_flow/state_flow.admin.inc
Form builder: Builds the node administration overview.

File

modules/state_flow/state_flow.admin.inc, line 257
Revision Content administration.

Code

function state_flow_admin_nodes_validate($form, &$form_state) {

  // Error if there are no items to select.
  if (!is_array($form_state['values']['nodes']) || !count(array_filter($form_state['values']['nodes']))) {
    form_set_error('', t('No items selected.'));
  }
}