Found by the docs audit of the first-run path (#10563).
What is wrong
content/docs/data-modeling/validation-rules.mdx:147 states:
Default constraints: Stored as { value, currency } pair. Precision
defaults to 2 decimal places.
A currency value is a bare number. packages/spec/src/data/field-value.zod.ts:52-55:
/** Value is a finite numeric scalar. `currency` IS a bare number (see header). */exportconstNUMERIC_VALUE_TYPES: ReadonlySet<string>=newSet(['number','currency','percent','rating','slider','progress','summary',]asconstsatisfiesreadonlyFieldType[]);
valueSchemaFor (same file, line 412) returns z.number().finite() for every
member of that set. There is no { value, currency } envelope anywhere on the
value path; the per-record currency code is a separate concern carried by
currencyConfig (currencyMode: 'dynamic' | 'fixed', defaultCurrency), which
the same table two rows above documents correctly.
The sibling page does not carry the error: content/docs/data-modeling/field-types.mdx:147-162
documents currency with the same currencyConfig table and makes no stored-shape
claim.
Back-link: #10563
Found by the docs audit of the first-run path (#10563).
What is wrong
content/docs/data-modeling/validation-rules.mdx:147states:A
currencyvalue is a bare number.packages/spec/src/data/field-value.zod.ts:52-55:valueSchemaFor(same file, line 412) returnsz.number().finite()for everymember of that set. There is no
{ value, currency }envelope anywhere on thevalue path; the per-record currency code is a separate concern carried by
currencyConfig(currencyMode: 'dynamic' | 'fixed',defaultCurrency), whichthe same table two rows above documents correctly.
The sibling page does not carry the error:
content/docs/data-modeling/field-types.mdx:147-162documents
currencywith the samecurrencyConfigtable and makes no stored-shapeclaim.
Back-link: #10563