Fields
Repeater Behavior
How ContentGuard evaluates Repeater and nested Repeater fields.
ContentGuard evaluates ACF Repeater (and Flexible Content) fields with row context rather than flattening every value into one string. Requires ACF Pro.
WHEN: any-row
WHEN conditions on Repeater or Flexible Content targets use any-row semantics. The condition matches if any applicable row or layout instance meets the operator.
Example: if any Ingredients row’s title contains a restricted term, a condition-only rule targeting that field can fire.
THEN: every-row
THEN validations apply to every matching row or instance. Each failing row can produce a finding. Audit may collapse repeated failures for the same rule/field into one finding that lists the affected rows.
Nesting depth
| Path | Supported |
|---|---|
| Repeater → scalar | Yes |
| Repeater → Repeater → scalar | Yes (exactly two Repeater levels) |
| Three or more Repeater levels | No |
A common nested pattern looks like:
Ingredients (Repeater)
└── Ingredient Title (text)
└── Section Ingredients (Repeater)
└── Ingredient (text)
Directions (Repeater)
└── Section Title (text)
└── Section Directions (Repeater)
└── Direction (text)
That shape is a generic two-level Repeater example used in plugin tests—not a customer claim.
No rows
When a THEN validation is configured for every Repeater row and the Repeater has no rows, ContentGuard can fail with a finding that asks editors to add at least one row (for example, “Add at least one Ingredients row.”).
Empty WHEN on a missing instance is evaluated against an empty value (so is_empty can match; contains does not).
Row numbers in findings
Editor and audit messages can include row context so editors know which instance failed:
- Single row:
… in row 3. - Nested coordinates: outer/inner display rows such as
2/1 - Multiple rows collapsed:
… in 3 rows (rows 1, 2, 5). - Flexible Content may include the layout label in the message
Mixed nested rows
Outer and inner rows are evaluated independently. A failure on one inner row does not imply every sibling failed. Nested findings keep coordinates for the specific outer/inner pair when both levels apply.
Unsupported combinations
ContentGuard intentionally does not support:
- Third-level (or deeper) Repeater nesting
- Repeater → Group
- Repeater inside Flexible Content
- Nested Flexible Content
- Cross-row logic (comparing one row to another)
Clone inside Repeater (Repeater → Clone → scalar) is supported when ACF Pro Clone is used; see ACF.