Drupal is a registered trademark of Dries Buytaert

ai_validations

1 sites No security coverage
View on drupal.org

Overview

AI Validations adds AI-powered validation rules to the Field Validation module. You can send text and images to any configured AI provider (via the AI Core module) and automatically pass or fail field values based on the AI response.

Features

  • AI text prompt validation — Use a custom prompt with a text field value. The prompt must instruct the model to evaluate the content and return XTRUE when the value passes or XFALSE when it fails.
  • AI image classification validation — Send uploaded images to your AI provider for classification. Validation fails when the image is classified into a category you have marked as disallowed. You can set the classification tag, finder type, and minimum confidence.
  • AI image prompt validation — Send an uploaded image plus a custom prompt. The prompt must instruct the model to return XTRUE or XFALSE (e.g. "contains no explicit content", "shows a person wearing safety equipment").
  • AI object detection validation — Validate images using the AI module's object detection operation. Require or forbid specific object names in an image, use AND or OR logic for multiple keywords, and configure when validation passes or fails.
    Yet to be merged: https://www.drupal.org/project/ai_validations/issues/3575363

Requirements

Use cases

  • Enforce content policies on user-generated text (e.g. block profanity or unsafe content)
  • Reject images that match disallowed categories (e.g. NSFW or off-brand imagery)
  • Ensure uploaded media contains required elements (e.g. logo, safety equipment, product shot)
  • Require or block specific objects in images (e.g. "must contain person", "must not contain weapon")

How it works

The module exposes Field Validation plugins that you attach to supported fields. Each rule calls your chosen AI provider through AI Core, interprets the model response, and returns pass/fail to Field Validation, so you manage AI-driven checks alongside your existing validation rules in the same UI.

Activity

Total releases
3
First release
Dec 2025
Latest release
1 week ago
Release cadence
35 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.3.x-dev Dev Feb 24, 2026
1.0.0-alpha1 Pre-release Dec 17, 2025
1.0.x-dev Dev Dec 17, 2025