You are here

function _captcha_get_error_message in CAPTCHA 8

Same name and namespace in other branches
  1. 7 captcha.inc \_captcha_get_error_message()

Gets the error message for when a user enters an incorrect CAPTCHA answer.

Return value

string Error message.

2 calls to _captcha_get_error_message()
CaptchaSettingsForm::buildForm in src/Form/CaptchaSettingsForm.php
Form constructor.
captcha_validate in ./captcha.module
CAPTCHA validation handler.

File

./captcha.inc, line 187
General CAPTCHA functionality and helper functions.

Code

function _captcha_get_error_message() {
  $error_message = \Drupal::config('captcha.settings')
    ->get('wrong_captcha_response_message');
  if ($error_message) {
    return Xss::filter($error_message);
  }
  return t('The answer you entered for the CAPTCHA was not correct.');
}