rows

How many rows a table has, which rows it must have, and what each cell may hold.

Navigator: The star chart has columns for a reason.

Quick reference

Examples

rows.min

Require the Markdown table to have at least N data rows (the header and separator rows do not count).

Enough rows passes

contract.mdv.md
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.min=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |
document.md
## Crew

| Name | Role |
| ---- | ---- |
| Ines | Pilot |
| Tomas | Engineer |

✓ passes

A table with too few rows is flagged

contract.mdv.md
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.min=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |
document.md
## Crew

| Name | Role |
| ---- | ---- |
| Ines | Pilot |

✗ too-few-rows error · line 3

rows.max

Allow the Markdown table to have at most N data rows (the header and separator rows do not count).

A table with too many rows is flagged

contract.mdv.md
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.max=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |
document.md
## Crew

| Name | Role |
| ---- | ---- |
| Ines | Pilot |
| Tomas | Engineer |
| Mara | Medic |

✗ too-many-rows error · line 3

rows.in

Require every table body row to jointly equal one canon record from a records-projected source, matched by header text = field name.

<!-- mdv: section -->
## Status
<!-- mdv: table rows.in=./metrics.json -->
| metric  | period | unit | value |
| ------- | ------ | ---- | ----- |
| Latency | Q1     | ms   | 120   |
<!-- mdv: endtable -->
<!-- mdv: endsection -->

col

Constrain a named column with rows.<name>.<constraint>, including in=[…] (the cell is one of a list), required, pattern (a regex), mask, and unique checks.

Cells drawn from the allowed list pass

contract.mdv.md
<!-- mdv: section required -->
## Systems
<!-- mdv: table rows.Status.in=[open, done] -->
| System | Status |
| ------ | ------ |
| Docking | done |
document.md
## Systems

| System | Status |
| ------ | ------ |
| Docking | done |
| Relay | open |

✓ passes

A cell outside the allowed list is flagged

contract.mdv.md
<!-- mdv: section required -->
## Systems
<!-- mdv: table rows.Status.in=[open, done] -->
| System | Status |
| ------ | ------ |
| Docking | done |
document.md
## Systems

| System | Status |
| ------ | ------ |
| Docking | done |
| Relay | broken |

✗ value-not-allowed error · line 6

Range

Both bounds at once, inclusive (a.. or ..b for one side):

<!-- mdv: section rows.range=20..200 -->
## Summary
<!-- mdv: endsection -->

See also: Validate a status table

On this page