AI Validations adds AI-powered rules to the Field Validation module. Attach a rule to a text, image or audio field, pick an AI provider from the AI module, and the rule checks the value when the form is saved.
Rules
- Text prompt: your own prompt decides if the text passes.
- Moderation: fails text the provider's moderation flags, for all categories or only the ones you choose.
- Text classification: fails text classified into a category you don't allow.
- Image prompt: your own prompt checks an uploaded image. It can also warn instead of block (see below).
- Image classification: fails images classified into a category you don't allow.
- Object detection: requires or forbids named objects in an image.
- Audio: transcribes the file, then your prompt checks the transcript.
The image rules can use an image style to send a smaller image and save tokens.
New in 1.4
- Warn instead of block. Give an image prompt rule a Warning message and have the prompt answer
XSAFE,XWARNorXBLOCK. Borderline images are saved and the uploader sees a warning. Clear violations are still blocked. - AI Context support. With AI Context installed, the text, image and audio prompt rules can receive site context such as style guides and policies. You don't have to copy that guidance into every prompt.
Use cases
- Block hate speech, violence or spam.
- Enforce your content policy or brand rules with a prompt.
- Block unsafe images, or let borderline ones through with a warning.
- Require or forbid specific objects in images.
- Check what is said in an audio upload.
Requirements
- AI 1.3 or later, with at least one provider set up
- Field Validation 3.x
- Optional: AI Context 1.0.0-beta5 or later. Matching context by entity type, entity or taxonomy needs AI 1.5 or later.
Supported versions
- 1.4.x: current. All new work goes here.
- 1.3.x: security fixes only, until January 2027.
- 1.0.x: not supported.
Upgrading to 1.4
Prompts are now sent as the system prompt, and the model's reply must start with the verdict token, for example XTRUE. Check that your prompts ask for this. See the 1.4.0 release notes.
Project information
- Project categories: Artificial Intelligence (AI), Content editing experience, Media
- Ecosystem: AI (Artificial Intelligence)
5,896 sites report using this module
- Created by wouters_f on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.







