You are here

function nodequeue_generate_form_validate in Nodequeue 7.3

Same name and namespace in other branches
  1. 6.2 nodequeue_generate.module \nodequeue_generate_form_validate()
  2. 7.2 nodequeue_generate.module \nodequeue_generate_form_validate()

Validate nodequeue generate form submission.

Make sure that at least one queue was selected.

File

./nodequeue_generate.module, line 73

Code

function nodequeue_generate_form_validate($form, &$form_state) {
  $queues = array_keys(array_filter($form_state['values']['nodequeues']));
  if (count($queues) < 1) {
    form_set_error('nodequeues', t('You must select a Queue.'));
  }
}