Overview
The ValidateContent block validates text content against various rules like required substrings, forbidden words, length constraints, and regex patterns.Input Parameters
Required
Note: Use the
from/as input format to map your data to the text parameter.
Configuration
All config parameters are optional. Use the ones relevant to your validation:Output Fields
Examples
Validate Required Keywords
Forbid Inappropriate Content
Validate Text Length
Regex Pattern Matching
Combined Validations
Common Patterns
Validate AI Response Quality
Multi-Field Validation
Content Safety Check
Validation Score
Thescore field represents how well the content passed validation:
- 1.0 - All validations passed
- 0.5 - Some validations failed
- < 0.5 - Multiple validations failed
- Missing required content
- Forbidden content found
- Length violations
- Pattern mismatches
Error Messages
Common failure messages:Full Example
Tips
Use from/as Input Format
Use from/as Input Format
ValidateContent expects a
text parameter. Use the from/as format:Case-Insensitive by Default
Case-Insensitive by Default
The
contains and notContains checks are case-insensitive:Combine with LLMJudge
Combine with LLMJudge
Use ValidateContent for structural checks, LLMJudge for semantic validation:
Use Regex for Complex Patterns
Use Regex for Complex Patterns
Regex patterns are powerful for complex validation:
When to Use
Use ValidateContent when:- Checking for required keywords
- Filtering inappropriate content
- Validating text length
- Pattern matching (emails, URLs, etc.)
- Structural content validation
- Checking semantic meaning
- Evaluating tone or style
- Comparing similarity to expected content
- Complex reasoning about content
Next Steps
LLMJudge
Semantic content validation
ValidateTools
Validate AI tool calls

