You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0dd0804
Browse filesBrowse the repository at this point in the historyBrowse files
fix(spec): the currency-object sentence cites ADR-0104 on the bare-number clause only
ADR-0104 decides that a currency value is a bare number; the tenant
default comes from the currency-mode contract, not from the ADR. The cite
moves next to the bare-number clause in all four locales and in the
changeset's quoted sentence.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzenS8UJFmncftEGHsd
Copy file name to clipboardExpand all lines: .changeset/27236-currency-object-value-lesson.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Metadata-protocol: none
12
12
13
13
The `{ value, currency }` shape was retired by ADR-0104 D1. A record write that still sends it to a `currency` field was refused with only "Amount must be a number", which does not say what to write instead.
14
14
15
-
-**`@objectstack/objectql`**: when a `currency` field's value is a plain object, the `invalid_number` refusal now reads: "Amount is a currency amount: write it as a bare number (e.g. 10), not an object such as { value, currency }. A currency field declares its currency in currencyConfig: the fixed mode's defaultCurrency, or under the dynamic mode (the default) the tenant default currency (ADR-0104)". The wire code stays `invalid_number`, with no new key on the error, so no client contract moves. A non-number string, an array, and an object on a `number` field keep the plain sentence.
15
+
-**`@objectstack/objectql`**: when a `currency` field's value is a plain object, the `invalid_number` refusal now reads: "Amount is a currency amount: write it as a bare number (ADR-0104), such as 10, not an object such as { value, currency }. A currency field declares its currency in currencyConfig: the fixed mode's defaultCurrency, or under the dynamic mode (the default) the tenant default currency". The wire code stays `invalid_number`, with no new key on the error, so no client contract moves. A non-number string, an array, and an object on a `number` field keep the plain sentence.
16
16
-**`@objectstack/spec`**: the validation-message catalog carries that sentence as `invalid_number_currency_object`, in en, zh-CN, ja-JP and es-ES. A deployment can override it under `validation.field.invalid_number_currency_object`, like any other built-in message.
17
17
18
18
What to do: nothing. Writes that were accepted are still accepted, and writes that were refused are still refused with the same code.
// as an object, the retired `{ value, currency }` shape (ADR-0104 D1). The
117
117
// sentence names no currency code: the field's `currencyConfig` or the
118
118
// tenant default decides it (#27119 Q2 = X).
119
-
invalid_number_currency_object: '{{label}} is a currency amount: write it as a bare number (e.g. 10), not an object such as { value, currency }. A currency field declares its currency in currencyConfig: the fixed mode\'s defaultCurrency, or under the dynamic mode (the default) the tenant default currency (ADR-0104)',
119
+
invalid_number_currency_object: '{{label}} is a currency amount: write it as a bare number (ADR-0104), such as 10, not an object such as { value, currency }. A currency field declares its currency in currencyConfig: the fixed mode\'s defaultCurrency, or under the dynamic mode (the default) the tenant default currency',
120
120
invalid_boolean: '{{label}} must be true or false',
121
121
invalid_date: '{{label}} must be a valid date (ISO-8601)',
122
122
invalid_datetime: '{{label}} must be a valid datetime (ISO-8601)',
invalid_url: '{{label}} debe ser una URL válida (scheme://...)',
272
272
invalid_phone: '{{label}} debe ser un número de teléfono válido',
273
273
invalid_number: '{{label}} debe ser un número',
274
-
invalid_number_currency_object: '{{label}} es un importe de moneda: escríbalo como un número sin más (p. ej., 10), no como un objeto del tipo { value, currency }. El campo declara su moneda en currencyConfig: el defaultCurrency del modo fixed o, en el modo dynamic (el predeterminado), la moneda predeterminada del inquilino (ADR-0104)',
274
+
invalid_number_currency_object: '{{label}} es un importe de moneda: escríbalo como un número sin más (ADR-0104), por ejemplo 10, no como un objeto del tipo { value, currency }. El campo declara su moneda en currencyConfig: el defaultCurrency del modo fixed o, en el modo dynamic (el predeterminado), la moneda predeterminada del inquilino',
275
275
invalid_boolean: '{{label}} debe ser true o false',
276
276
invalid_date: '{{label}} debe ser una fecha válida (ISO-8601)',
277
277
invalid_datetime: '{{label}} debe ser una fecha y hora válidas (ISO-8601)',
0 commit comments