You are here

function freelinking_page_form_validate in Freelinking 6

Same name and namespace in other branches
  1. 5 freelinking.module \freelinking_page_form_validate()
  2. 6.2 freelinking.module \freelinking_page_form_validate()

File

./freelinking.module, line 359

Code

function freelinking_page_form_validate($form_id, &$form_state) {

  // check that no values submitted results in clean error
  if (!$form_values['links']) {
    $form_values['links'] = array(
      NULL,
    );
  }
  $links = array_filter($form_values['links']);
  if (count($links) == 0) {
    form_set_error('form', t('No items selected'));
  }
}