You are here

function andromeda_slideshow_form_validate in Andromeda Slideshow 7.2

Same name and namespace in other branches
  1. 7 includes/andromeda_slideshow.forms.inc \andromeda_slideshow_form_validate()

Validate handler for andromeda_slideshow_form

File

includes/andromeda_slideshow.forms.inc, line 98
Form definitions for andromeda slideshow module

Code

function andromeda_slideshow_form_validate($form, &$form_state) {
  $slideshow = $form['#slideshow'];
  $machine_name = $form_state['values']['name'];
  if (andromeda_slideshow_machine_name_exists($machine_name)) {
    if ($machine_name != $slideshow->name) {
      form_set_error('name', t('The machine-readable name is already in use. It must be unique.'));
    }
  }
}