Feature proposal #5459
closed
Implement form validation for recaptcha
Added by krileon about 10 years ago.
Updated over 8 years ago.
Start date:
19 August 2015
Description
Implement custom jQuery Validate rule to validate reCaptcha input. This needs to be done carefully as the verify tokens are usable once then need to be regenerated. So if it fails and the form is submitted again it could form lock.
https://developers.google.com/recaptcha/docs/verify
Best implementation is to likely just add a callback to the reCaptcha and add it as a data attribute to the container div. A custom jQuery Validate rule would then check the data attribute for a response and decide what to do from there. This avoids using getResponse and avoids having to possibly reset the captcha once the verify token has been used.
A text input marked required that is filled with a value based off the callback response could also work. Then jQuery Validate would be able to simply automatically handle it with no additional custom rules. A hidden input won't work as by default cbValidate jQuery Validate implementation ignores hidden input so it needs to be text with display none style.
- Target version changed from 703 to 3.0.0
- Status changed from Assigned to Rejected
- Target version deleted (
3.0.0)
- % Done changed from 0 to 100
Not necessary for v2 and invisible usages.
Also available in: Atom
PDF