You are here

function pardot_admin_scoring_validate in Pardot Integration 6

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

File

./pardot.admin-scoring.inc, line 45

Code

function pardot_admin_scoring_validate($form, $form_state) {
  if (!is_numeric($form_state['values']['score'])) {
    form_set_error('score', t('Your score must be a number'));
  }
  if (db_result(db_query("SELECT path FROM {pardot_scoring} WHERE path = '%s'", $form_state['values']['path']))) {
    form_set_error('path', t('Your path much be unique'));
  }
}