function shortcut_set_edit_form_validate

Validation handler for shortcut_set_edit_form().

File

drupal/modules/shortcut/shortcut.admin.inc, line 637
Administrative page callbacks for the shortcut module.

Code

function shortcut_set_edit_form_validate($form, &$form_state) {

  // Check to prevent a duplicate title, if the title was edited from its
  // original value.
  if ($form_state['values']['title'] != $form_state['values']['shortcut_set']->title && shortcut_set_title_exists($form_state['values']['title'])) {
    form_set_error('title', t('The shortcut set %name already exists. Choose another name.', array(
      '%name' => $form_state['values']['title'],
    )));
  }
}