Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

AI Validations enhances the Field Validation module by integrating AI-powered checks for various field types. It allows you to leverage AI for tasks like content moderation, text classification, image analysis, and even audio validation based on custom prompts or predefined rules. This enables automatic filtering and validation of user-submitted content through your configured AI providers.

Overview

AI Validations adds AI-powered validation rules to the Field Validation module. Attach any of the seven built-in rules to a text, image, or audio field, point it at an AI provider configured in AI Core, and it will pass or fail the field value automatically.

Features

  • AI text prompt validation. Send a custom prompt with a text field value. The prompt must instruct the model to return XTRUE when the value passes or XFALSE when it fails.
  • AI moderation validation. Validate text fields using the AI module's native moderation operation. Content flagged by the provider fails validation. You can restrict failure to specific categories (e.g. hate,violence,sexual); if left blank, any flagged category causes failure.
  • AI text classification validation. Send a text field value to your AI provider for classification. Validation fails when the text is classified as the category you configure. You can set the tag, finder type (exact, contains, or case-insensitive), and a minimum confidence threshold.
  • AI image classification validation. Send uploaded images to your AI provider for classification. Validation fails when the image is classified into a disallowed category. You can set the tag, finder type, and minimum confidence. An image style can be applied first to reduce token usage.
  • AI image prompt validation. Send an uploaded image with 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"). Accepts an optional image style to reduce token usage.
  • AI object detection validation. Validate images using the AI module's object detection operation. Require or forbid specific object names, use AND or OR logic for multiple keywords, and configure whether the rule passes or fails on a match. Accepts an optional image style to reduce token usage.
  • AI audio validation. Validate audio file fields. A speech-to-text provider transcribes the uploaded file, then a chat provider evaluates the transcript against your custom prompt. The prompt must instruct the model to return XTRUE if the value passes or XFALSE if it fails.

Requirements

Use cases

  • Block user-submitted text that fails an AI moderation check (e.g. hate speech, violent content)
  • Reject submissions your AI provider classifies as spam or off-topic
  • Enforce content policies on text fields with a custom XTRUE/XFALSE prompt
  • Reject uploaded images that match a disallowed classification (e.g. NSFW or off-brand imagery)
  • Require uploaded photos to contain specific elements (e.g. a logo, safety equipment, a product shot)
  • Require or block named objects in images (e.g. "must contain person", "must not contain weapon")
  • Validate audio uploads by transcribing them and evaluating the transcript against a custom prompt

How it works

Each rule is a Field Validation plugin. You attach it to a field, choose your AI provider and model through AI Core, and configure the match criteria. On form save the rule calls the provider, interprets the response, and returns pass or fail to Field Validation. All six rules sit alongside your existing validation rules in the same admin UI.

Activity

Total releases
4
First release
Dec 2025
Latest release
2 weeks ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.3.0 Stable Jul 1, 2026
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