public function WordListCaptchaSettingsForm::validateForm in CAPTCHA Pack 8
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- text_captcha/
modules/ word_list_captcha/ src/ Form/ WordListCaptchaSettingsForm.php, line 90
Class
- WordListCaptchaSettingsForm
- Administration form.
Namespace
Drupal\word_list_captcha\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// Check the number of words in the pools.
$list_size = (int) $form_state
->getValue('word_list_captcha_list_size');
_text_captcha_word_pool_validate('word_list_captcha_word_pool_1', $form_state, $list_size, 0, '');
_text_captcha_word_pool_validate('word_list_captcha_word_pool_2', $form_state, $list_size, 0, '');
parent::validateForm($form, $form_state);
}