You are here

function botcha_admin_settings_validate in BOTCHA Spam Prevention 7

Same name and namespace in other branches
  1. 6 botcha.pages.inc \botcha_admin_settings_validate()

Validation handler for botcha_admin_settings form.

File

./botcha.pages.inc, line 247
Implementation of botcha administration forms.

Code

function botcha_admin_settings_validate($form, &$form_state) {
  $form_id = $form_state['values']['botcha_form_id_overview']['botcha_new_botcha_point']['form_id'];
  if (!preg_match('/^[a-z0-9_]*$/', $form_id)) {
    form_set_error('botcha_form_id_overview][botcha_new_botcha_point][form_id', t('Illegal form_id'));
  }
}