Add a hook to allow modules to respond to validation failures

Created on 25 September 2025, about 1 month ago
Updated 18 October 2025, 14 days ago

Problem/Motivation

We are adding multiple layers of anti spam measures to our project. Whenever a layer fails validation, we would like to log an event in the flood table to eventually automatically block users when they go over a certain threshold. A hook seems the most flexible, the honeypot module has hook_honeypot_reject() for this. Maybe we could add something similar.

Proposed resolution

It would be great if the antibot module would add hook_antibot_reject() to respond to validation failures for antibot. In our case we would log to the flood table, but maybe other modules want a different way of handling this.

Remaining tasks

  • Write a patch
  • Review
  • Commit

User interface changes

None

API changes

A new hook hook_antibot_reject() will be added.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024