You are here

public function TfaTotpSetup::validateSetupForm in TFA Basic plugins 7

@copydoc TfaSetupPluginInterface::validateSetupForm()

Overrides TfaSetupPluginInterface::validateSetupForm

File

includes/tfa_totp.inc, line 251
classes for tfa_totp

Class

TfaTotpSetup
Class TfaTotpSetup

Code

public function validateSetupForm(array $form, array &$form_state) {
  if (!$this
    ->validate($form_state['values']['code'])) {
    $this->errorMessages['code'] = t('Invalid application code. Please try again.');
    return FALSE;
  }
  else {
    return TRUE;
  }
}