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
| Written as | Fails with | Applies to |
|---|---|---|
rows. | too-few-rows error | table |
rows. fix: opt-in | too-many-rows error | table |
rows. | rows-header-mismatch errorunknown-entity error | table |
col | table-cell-invalid errortable-unknown-column warnvalue-wrong-form errortable-cell-duplicate errorvalue-not-given errorvalue-not-allowed errorunknown-entity error | table |
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
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.min=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |## Crew
| Name | Role |
| ---- | ---- |
| Ines | Pilot |
| Tomas | Engineer |✓ passes
A table with too few rows is flagged
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.min=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |## 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
<!-- mdv: section required -->
## Crew
<!-- mdv: table rows.max=2 -->
| Name | Role |
| ---- | ---- |
| Ines | Pilot |## 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
<!-- mdv: section required -->
## Systems
<!-- mdv: table rows.Status.in=[open, done] -->
| System | Status |
| ------ | ------ |
| Docking | done |## Systems
| System | Status |
| ------ | ------ |
| Docking | done |
| Relay | open |✓ passes
A cell outside the allowed list is flagged
<!-- mdv: section required -->
## Systems
<!-- mdv: table rows.Status.in=[open, done] -->
| System | Status |
| ------ | ------ |
| Docking | done |## Systems
| System | Status |
| ------ | ------ |
| Docking | done |
| Relay | broken |✗ value-not-allowed error · line 6
Range
Both bounds at once, inclusive (a. or . for one side):
<!-- mdv: section rows.range=20..200 -->
## Summary
<!-- mdv: endsection -->See also: Validate a status table