Menu

How to Handle Form Submissions in Node.js and Express (Without Writing Spam Logic)
πŸ“°

How to Handle Form Submissions in Node.js and Express (Without Writing Spam Logic)

DEV Community: expressΒ·Alen | SmartForm AIΒ·1 day ago
#XNPQQIrG
#devtoexpress#devto#dev#express#const
Reading 0:00
15s threshold

The first Express contact form I shipped was about 140 lines. Multer for multipart parsing, express-validator for the field checks, a honeypot field I hoped bots would fill, a Redis rate limiter, and a half-finished isSpam heuristic that mostly flagged legitimate customers from Singapore.

Then a bot filled the form 400 times in a night. It was a "SEO services" spam that slipped past because I'd hardcoded a keyword blocklist instead of classifying the message.

βœ… The short version

Post your Express form to a form backend endpoint and the spam filtering, intent classification, and notifications happen on their side. Or point a webhook at your Express app and receive already-processed submissions.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.