ShtukbaseStandard
SCH-R02/norms/rules/collections/SCH-R02.md

A field value is from the list of valid ones

MUSTblockscheckactive
A field value is from the list of valid ones
Why: A value outside the list falls out of the boards and filters.
Page fields (14)
ruleIdSCH-R02
requirementA field value is from the list of valid ones
levelMUST
floorfalse
statusactive
sphereknowledge
appliesTo/
enforcers.shtukbase/packages/collections/checks/s02_values.ts
enforcerKindgate
modeenforce
becauseA value outside the list falls out of the boards and filters.
reviewBy2027-05-25
packcollections
railTake a field value from the schema list; if a new value is not in the schema, first extend the schema.

A select field takes its value from the options of its schema (if there is no options, the value is free). date is a date YYYY-MM-DD, number is a number, checkbox is true or false. An empty field is not checked. A phase field (the state of a contour) is checked by the package contours.

Why. A program does not recognize a value outside the list: the record falls out of the boards and filters.

How to fix. Choose a value from the schema list. If the needed value is not there, first add it to the collection schema, then set it in the record.

Run. From the project root, a package action: bun .shtukbase/packages/collections/checks/s02_values.ts. A violation is one line per record and exit code 1; no violations is exit code 0.

The enforcer is the values check of the collections package (the code is taken from the standard's checks-schema set; the number s02 does not change). The mode is blocking: the check finishes with an error if the project has even one violation.

The package Collections puts this page at /norms/rules/collections/SCH-R02.md.Source text