You are here

function pardot_admin_campaign_validate in Pardot Integration 6

Same name and namespace in other branches
  1. 7.2 pardot.admin-campaign.inc \pardot_admin_campaign_validate()
  2. 7 pardot.admin-campaign.inc \pardot_admin_campaign_validate()

File

./pardot.admin-campaign.inc, line 56

Code

function pardot_admin_campaign_validate($form, $form_state) {
  if (db_result(db_query("SELECT campaign_id FROM {pardot_campaign} WHERE campaign_id = '%s'", $form_state['values']['campaign_id']))) {
    form_set_error('campaign_id', t('Your Campaign ID much be unique'));
  }
}