public function test_google_authenticator::validateForm in Google Authenticator / 2 Factor Authentication - 2FA 8.2
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
- src/
Form/ test_google_authenticator.php, line 122 - Email verification functions.
Class
- test_google_authenticator
- Menu callback for email verification.
Namespace
Drupal\miniorange_2fa\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if (empty($form_state
->getValue('mo_auth_googleauth_token'))) {
$form_state
->setErrorByName('mo_auth_googleauth_token', $this
->t('Please enter the passcode.'));
}
}