You are here

function _tfa_basic_form_validate in TFA Basic plugins 7

Validation handler to encourage use of fallback if there are form errors.

1 string reference to '_tfa_basic_form_validate'
tfa_basic_form_tfa_form_alter in ./tfa_basic.module
Implements hook_form_FORM_ID_alter().

File

./tfa_basic.module, line 371

Code

function _tfa_basic_form_validate($form, &$form_state) {
  $errors = form_get_errors();
  if (!empty($errors) && !empty($form_state['values']['code']) && isset($form['actions']['fallback'])) {
    drupal_set_message(t("If you are having trouble click \"Can't access your account?\" for further authentication options."), 'warning');
  }
}