From e7fdb3ab52b62b7a1e37aa81fac68c836230e999 Mon Sep 17 00:00:00 2001 From: dc Date: Wed, 23 Sep 2026 08:19:40 +0000 Subject: [PATCH] docs(validations): primary keys are NOT NULL; HARDSELECT can match a special missing - a primary key column rejects a blank and a special missing whether or not the table carries a constraint or MPE_VALIDATIONS a NOTNULL rule - HARDSELECT is now checked like any other value: it passes when the dropdown list contains the special missing - HARDSELECT drops out of the 'not supported' list --- docs/dcc-validations.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/dcc-validations.md b/docs/dcc-validations.md index d1bb4f1..e3053b8 100644 --- a/docs/dcc-validations.md +++ b/docs/dcc-validations.md @@ -60,10 +60,12 @@ The rules treat a special missing as a value for some checks and as a missing va |ROUND|Ignored - ROUND only rounds values that are numbers, so a special missing is left as typed.| |HARDREGEX / SOFTREGEX|Checked against the pattern like any other value. Unlike blanks and the plain `.`, special missings are **not** exempt. See [Regex Rules](#regex-rules).| |SOFTSELECT|Passes - a soft dropdown never blocks a value.| -|HARDSELECT|Fails - the strict membership test cannot match it (the dropdown list for a numeric column holds numbers).| +|HARDSELECT|Checked against the dropdown list like any other value - it passes only if the list contains it.| |HARDFORMULA / SOFTFORMULA|The formula returns `#VALUE!` for that row instead of a number, and that is what gets submitted.| -In short, a special missing is **not supported** in a column that carries NOTNULL, MINVAL, MAXVAL, HARDSELECT or a formula. It is fine alongside the regex rules, a soft dropdown, and ROUND. +In short, a special missing is **not supported** in a column that carries NOTNULL, MINVAL, MAXVAL or a formula. It is fine alongside the regex rules, a soft dropdown, and ROUND. + +A primary key column is treated as NOT NULL whether or not the target table carries a physical constraint, and whether or not MPE_VALIDATIONS has a NOTNULL rule for it - a key identifies the row, so a blank and a special missing are both rejected there. One related gotcha: a range rule's own value must be a number. Put a special missing in `MINVAL` and every cell in the column fails; put one in `MAXVAL` and every real number fails.