DEV Community


Discussion on: How to create a simple Honeypot to protect your Forms against Spammers

redrego profile image

What if the bot checks for required field? in that case this would fail

felipperegazio profile image
Felippe Regazio Author

thats true, and thats can be a good point to think about how to solve. i use this code in a lot of systems, and it works well for most of cases. but, with no doubt, it has a lot of lacks, as more complex bots would be able to submit the form. i like to think in it as an extra layer of security.

willsheppard profile image
Will Sheppard

If you want to remove the "required" HTML keyword, you could use javascript to implement the feature instead.