You are here

function recaptcha_admin_settings_validate in reCAPTCHA 7

Same name and namespace in other branches
  1. 5.2 recaptcha.module \recaptcha_admin_settings_validate()
  2. 6.2 recaptcha.admin.inc \recaptcha_admin_settings_validate()
  3. 6 recaptcha.admin.inc \recaptcha_admin_settings_validate()
  4. 7.2 recaptcha.admin.inc \recaptcha_admin_settings_validate()

Validation function for recaptcha_admin_settings().

See also

recaptcha_admin_settings()

File

./recaptcha.admin.inc, line 90
Provides the reCAPTCHA administration settings.

Code

function recaptcha_admin_settings_validate($form, &$form_state) {

  // Clear the page cache if Ajax API has been disabled.
  if (empty($form_state['values']['recaptcha_ajax_api']) && $form['recaptcha_ajax_api']['#default_value']) {
    cache_clear_all(NULL, 'cache_page');
  }
  $tabindex = $form_state['values']['recaptcha_tabindex'];
  if (!empty($tabindex) && !is_numeric($tabindex)) {
    form_set_error('recaptcha_tabindex', t('The Tab Index must be an integer.'));
  }
}