Rules
Conditions
WHEN operators that decide when a ContentGuard rule applies.
WHEN conditions decide when a ContentGuard rule applies. They compare a field value with an operator (and, for most operators, an operand). After every WHEN condition matches, ContentGuard evaluates the rule’s THEN validations—or, for condition-only rules, treats the match itself as the finding.
Empty WHEN
Leave WHEN empty to apply the rule to every post of the selected type. The rule then runs its THEN validations unconditionally.
A rule still needs at least one WHEN condition or one THEN validation.
Operators
| Operator | Typical builder label | Behavior |
|---|---|---|
equals | is / is equal to | Exact comparable-string match |
not_equals | is not / is not equal to | Value differs from the operand |
is_empty | is empty | Field has no value |
is_not_empty | is not empty | Field has a value |
contains | contains | Case-insensitive literal substring |
does_not_contain | does not contain | Substring is absent |
greater_than | is greater than | Numeric comparison |
greater_than_or_equal | is at least | Numeric comparison |
less_than | is less than | Numeric comparison |
less_than_or_equal | is at most | Numeric comparison |
Available operators depend on the selected field type in the Rule Builder.
Equals and not equals
Equality uses ContentGuard’s comparable string form (scalars only). Empty values equal other empty values. Non-scalar values do not compare as equal.
Empty and not empty
Empty means null, false, '', or []. Integer 0 and string "0" are not empty.
Contains and does not contain
These are WHEN-only operators—not THEN validators. They perform case-insensitive literal substring matching on string-like fields (for example text, textarea, WYSIWYG/Content, email, URL, single select, radio, button group).
- No regex, wildcards, fuzzy matching, or AI interpretation
- Empty field values never match
contains - Empty search operands are invalid and never match
does_not_containis the inverse ofcontains
Numeric comparisons
Greater than / less than (and their or-equal variants) apply to number and range fields. Date and date/time fields support equals, not equals, empty, and not empty—not numeric comparisons.
AND-only behavior
Multiple WHEN conditions use AND logic in V1. Every listed condition must match for the rule to apply. There is no OR grouping.
Condition-only rules
A rule can have WHEN conditions and no THEN validation. When the conditions match, the rule itself becomes the finding. With Blocking severity, that match prevents publishing (and updates to published/private content on supported paths) until the content no longer matches.
Restricted terminology
Applies to: Posts
- WHEN
- Content contains "healthy"
- THEN
- No validation needed
When Content contains "healthy", this rule blocks publishing.
This is a user-defined governance rule—not a built-in dictionary of banned words.
Repeated fields
WHEN conditions on Repeater and Flexible Content fields use any-row semantics: the condition matches if any applicable row or layout instance meets it. See Repeater Behavior.
Limitations
- No OR logic between conditions
- No regex, wildcards, fuzzy, or AI matching
contains/does_not_containare not available as THEN validators- Numeric comparisons are limited to number and range fields
- Cross-field formulas and cross-row logic are outside V1