Does a comma decimal separator change the value saved by the API?
The original implementation failed the “French decimal input” check. Expected 125 and observed 100. The corrected implementation met both expectations on the same inputs.
What the control case missed
A dot-separated amount hides the parser assumption. The comma form 1,25 is accepted as a prefix of 1 by the faulty parser, silently lowering the saved amount from 125 minor units to 100.
| Check | Expected | Original | Corrected |
|---|---|---|---|
| English decimal input | 125 | 125 | 125 |
| French decimal input | 125 | 100 | 125 |
What to check before merging
Define accepted locales and reject ambiguous input before persisting. The correction handles the two simple decimals in this fixture. Grouping separators, negatives and currency precision need their own product rules.
Reproduce the recorded result
Download the Node.js fixture and run node run.mjs locale-decimal-input with Node.js 24. Compare the printed JSON with the recorded results. This is a locally executed model of the regression, using synthetic inputs. It covers the rule shown here. Hosted runs, browser behaviour and customer PRs require their own evidence.