TBL-003 Allowed values
Overview
Section titled “Overview”Validates that the cell values in a specific column belong to the allowed list given by values. Any value outside the list triggers an error.
Why it matters
Section titled “Why it matters”Even if a team agrees on a fixed set of values for a Status column (draft / review / stable), over time custom values like wip or done slip in. Making the allowed set explicit prevents notation drift and ad-hoc usage from spreading.
Options
Section titled “Options”| Field | Type | Required | Description |
|---|---|---|---|
column | string | Yes | Column name to validate |
values | string[] | Yes | Array of allowed values |
files | string | — | Glob of files this rule applies to |
Bad example
Section titled “Bad example”| ID | Description | Status || ------ | --------------------- | ------ || REQ-01 | User registration | stable || REQ-02 | Password reset | wip |With values: ["draft", "review", "stable"], the value wip is outside the allowed list and triggers a violation.
docs/requirements.md line 4 error Invalid value "wip" in column "Status". Allowed: draft, review, stable TBL-003After fix
Section titled “After fix”| ID | Description | Status || ------ | --------------------- | ------ || REQ-01 | User registration | stable || REQ-02 | Password reset | review |Configuration example
Section titled “Configuration example”{ "rule": "tbl003", "options": { "column": "Status", "values": ["draft", "review", "stable"] }}Related rules
Section titled “Related rules”- TBL-004 Cell pattern — Validate values with a regex instead of a list
- TBL-005 Cross-column constraints — Constrain a column based on another column’s value