You are here

function botcha_admin_settings_validate in BOTCHA Spam Prevention 6

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

Validation handler for botcha_admin_settings form.

File

./botcha.pages.inc, line 241
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'));
  }
}