You are here

function foo_captcha_custom_advance_validation in CAPTCHA 8

Custom Advance CAPTCHA validation function.

These extra arguments are the $element and $form_state arguments of the validation function of the #captcha element. See captcha_validate() in captcha.module for more info about this.

Parameters

string $solution: The solution for the challenge as reported by hook_captcha('generate',...).

string $response: The answer given by the user.

array $element: The element argument.

array $form_state: The form_state argument.

Return value

true on success and FALSE on failure.

File

./captcha.api.php, line 158
Hooks for the captcha module.

Code

function foo_captcha_custom_advance_validation($solution, $response, array $element, array $form_state) {
  return $form_state['foo']['#bar'] = 'baz';
}