Skip to content

Reject a list data validation that has no formula1 (#1303) - #1326

Merged
aiongg merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-1303
Oct 22, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-1303

Conversation

@MarekSpodBiedry

Copy link
Copy Markdown
Contributor

Part of #1303 (the missing formula1 case).

data.validation with type: "list" and no formula1 (for example source used by mistake) used to succeed and store a list rule with an empty source, so every value was rejected afterwards. It now returns a bad-params error ("a list validation needs formula1"), so gridcraft-cli run --cmd exits non-zero, like the other required-parameter errors in data.rs (data.filterBy "missing column"). An empty or =-only formula1 is treated as missing. Nothing is stored when the command fails.

Other validation types are unchanged, and the Data Validation dialog always sends formula1 for a list rule.

Not changed here: the issue also asks for unknown parameter names (such as "bogus":1 on cell.set) to be rejected for every command. That is a change to command dispatch for all commands and needs a maintainer decision, so I left it out of this PR.

Test: list_validation_without_formula1_is_an_error covers the source typo from the issue, a missing formula1, and checks that a list rule with formula1 still accepts a listed value.

@MarekSpodBiedry
MarekSpodBiedry marked this pull request as ready for review October 14, 2026 17:39
@aiongg
aiongg merged commit cd5d217 into storytold:main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants