FormEasy
FormEasy copied to clipboard
Feat: Recaptcha validation
Hey there 👋 I have created an implementation for Google reCAPTCHA V2 so we can start the code review process.
When we agree on the structure, let's keep the PR open and I will implement more providers before the final review and merge.
I did manual QA with solution in this PR and was able to get it working on my demo application:


Related to issue https://github.com/Basharath/FormEasy/issues/1
One concern you might have is why I named the parameter g-recaptcha-response
(in readme, step 6. also Code.js line 105).
This name comes from Google Docs, and while we could easily rename it to something simpler, I find it important to stay as close to the native solution as possible. That will help people experienced with Google reCAPTCHA to easily use it in FormEasy without having to scan docs.
On the other hand, this will create inconsistency between different captcha providers. This could be a valid reason to try to use specific words for all of them, like captcha
. But with that, if some provider requires more than just a string response, we would make it a mess and people would have to learn how to pass it into FormEasy.
I would love to hear your feedback on this.
Hey @Basharath 👋 What do you think about PR - all good? Can I start implementing more adapters to support more captcha providers?
Hey @Meldiron I was waiting to hear from you about that.
It is all good so far, I haven't merged yet. Please add all the providers you want and then tell me so we can finalize the merge. Thanks!
Awesome, I'll do so in the upcoming days. Ill also take my time with research to see what Captcha providers are most commonly used.
Yeah, that's fine, you can take your time. Once done just update here.
any ETA on merging of this PR?
I am looking to use FormEasy with reCAPTCHA. Without CAPTCHA, it's just too much spam.
I won't be able to research other providers any time soon. With that said, reCAPTCHA is properly implemented and tested. This PR can be merged, in my opinion. In the future, I will open a new PR to add new providers.
Let me ping @Basharath about this.
Hey, @Meldiron I thought to ask you about this a few days ago, meanwhile, this happened.
I'll try merging this by this weekend and publish the new update.