function lost_character_captcha_settings_form_validate in CAPTCHA Pack 6
Same name and namespace in other branches
- 5 text_captcha/lost_character_captcha/lost_character_captcha.module \lost_character_captcha_settings_form_validate()
- 7 text_captcha/lost_character_captcha/lost_character_captcha.admin.inc \lost_character_captcha_settings_form_validate()
Validation function for the settings form
1 string reference to 'lost_character_captcha_settings_form_validate'
- lost_character_captcha_settings_form in text_captcha/
lost_character_captcha/ lost_character_captcha.admin.inc - Function for the settings form
File
- text_captcha/
lost_character_captcha/ lost_character_captcha.admin.inc, line 51
Code
function lost_character_captcha_settings_form_validate($form, &$form_state) {
$lost_quantity = (int) $form_state['values']['lost_character_captcha_quantity'];
$hinting = (int) $form_state['values']['lost_character_captcha_enable_hint'];
$min_length = 3 + 2 * $lost_quantity + (1 - $hinting);
// check the number of words in the pool
_text_captcha_word_pool_validate('lost_character_captcha_word_pool', $form_state['values'], 3, $min_length, 'The following words are too short (at least @minimum_length characters needed for the current settings of characters to lose and hinting): <div>@words</div>');
}