function pardot_admin_scoring_validate in Pardot Integration 7
Same name and namespace in other branches
- 6 pardot.admin-scoring.inc \pardot_admin_scoring_validate()
- 7.2 pardot.admin-scoring.inc \pardot_admin_scoring_validate()
Form validation handler for pardot_admin_scoring().
See also
File
- ./
pardot.admin-scoring.inc, line 62 - Admin scoring form.
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_query("SELECT path FROM {pardot_scoring} WHERE path = :path", array(
':path' => $form_state['values']['path'],
))
->fetchField()) {
form_set_error('path', t('Your path much be unique'));
}
}