You are here

function support_page_form_validate in Support Ticketing System 7

Same name and namespace in other branches
  1. 6 support.module \support_page_form_validate()

Validate that at least one ticket is selected.

File

./support.module, line 3443
support.module

Code

function support_page_form_validate($form, &$form_state) {
  $form_state['values']['tickets'] = array_diff($form_state['values']['tickets'], array(
    0,
  ));
  if (count($form_state['values']['tickets']) == 0) {
    form_set_error('', t('Please select one or more tickets to perform the update on.'));
  }
}