Per-field validation rules (min/max, length, regex) for field definitions #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec §6.2 lists "validation rules" as part of a field definition. The MVP registry (
crates/db/migrations/0004_field_definition.sql,domain::FieldDefinition) ships type +required+ vocabulary/authority binding only — no general per-field rules (numeric min/max, string length, regex/pattern, allowed-range for dates, etc.).Plan 5 (object JSONB values + validation) will validate values against type + required + binding as-is. If/when richer rules are wanted, add them as an additive migration (a rules column or a
field_definition_ruletable) plus a validation step —FieldType-orthogonal, so it layers on without disturbing the registry's shape.Source: Plan 4 (field-definition registry) final review — deliberate MVP scope cut, recorded for later.