You are here

function css_captcha_settings_form_validate in CAPTCHA Pack 5

Same name and namespace in other branches
  1. 6 css_captcha/css_captcha.admin.inc \css_captcha_settings_form_validate()
  2. 7 css_captcha/css_captcha.admin.inc \css_captcha_settings_form_validate()

Validation function

File

css_captcha/css_captcha.module, line 56

Code

function css_captcha_settings_form_validate($form_id, $form_values) {
  if ($form_id == 'css_captcha_settings_form') {
    if (preg_match('/\\s/', $form_values['css_captcha_allowed_characters'])) {
      form_set_error('css_captcha_allowed_characters', t('The list of characters to use should not contain spaces.'));
    }
  }
}