You are here

function deploy_plan_form_validate in Deploy - Content Staging 6

Validate callback for deploy_plan_form().

File

./deploy.plans.admin.inc, line 103
Page handlers for deploy plan admin.

Code

function deploy_plan_form_validate($form, &$form_state) {

  // If we're adding a new plan, then check to make sure another plan
  // doesn't exist with the same name.
  if (!array_key_exists('pid', $form_state['values'])) {
    if (deploy_plan_exists($form_state['values']['plan_name'])) {
      form_set_error('plan name', 'A plan with that name already exists');
    }
  }
}