public function TfaRecoveryCode::validateForm in Two-factor Authentication (TFA) 8
Validate form.
Parameters
array $form: The configuration form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
bool Whether form passes validation or not
Overrides TfaValidationInterface::validateForm
File
- src/
Plugin/ TfaValidation/ TfaRecoveryCode.php, line 140
Class
- TfaRecoveryCode
- Recovery validation class for performing recovery codes validation.
Namespace
Drupal\tfa\Plugin\TfaValidationCode
public function validateForm(array $form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
return $this
->validate($values['code']);
}