You are here

public function TfaBasicSmsSetup::validateSetupForm in TFA Basic plugins 7

@copydoc TfaSetupPluginInterface::validateSetupForm()

Overrides TfaSetupPluginInterface::validateSetupForm

File

includes/tfa_sms.inc, line 225

Class

TfaBasicSmsSetup
Class TfaBasicSmsSetup

Code

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