function recaptcha_admin_settings_validate in reCAPTCHA 7
Same name and namespace in other branches
- 5.2 recaptcha.module \recaptcha_admin_settings_validate()
- 6.2 recaptcha.admin.inc \recaptcha_admin_settings_validate()
- 6 recaptcha.admin.inc \recaptcha_admin_settings_validate()
- 7.2 recaptcha.admin.inc \recaptcha_admin_settings_validate()
Validation function for recaptcha_admin_settings().
See also
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.'));
}
}