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 210556d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(objectql,rest): a date or datetime refused for its year names the kind's years, not an ISO-8601 sentence
The record validator and the import's cell reader choose invalid_date_range /
invalid_datetime_range for a readable value whose year falls outside the kind's
supported years; the years come from core's SUPPORTED_TEMPORAL_YEARS, the range
isOutsideTemporalYearRange judges by. The field code stays invalid_date and its
constraint stays { type }.
Claude-Session: https://claude.ai/code/session_017VaLJnYwhPsanVCe9dMCJU
Co-authored-by: Claude <noreply@anthropic.com>
fix(objectql,rest): a `date` or `datetime` value refused for its year says so — "must be a date in the years 0001 to 9999" / "must be a datetime whose UTC year falls in the years 1000 to 9999" — instead of "must be a valid date (ISO-8601)", which was false for a value such as `0500-07-15T10:00:00Z` (#20846)
9
+
10
+
Clause-②: yes (widening) — one new export on `@objectstack/core`'s root, `SUPPORTED_TEMPORAL_YEARS`. No value's verdict moves and no wire key moves: the field code stays `invalid_date` and its `constraint` stays `{ type }`.
11
+
12
+
`POST` / `PATCH /api/v1/data/:object` and each row of `POST /api/v1/data/:object/import`
13
+
refuse a `date` outside the years 0001 to 9999 and a `datetime` whose UTC year falls
14
+
outside 1000 to 9999. When the value itself is readable — an ISO 8601 string such as
15
+
`0500-07-15T10:00:00Z` or `+010000-01-01`, or a `Date` — the refusal's message now
16
+
names the kind's years. An author who read "not valid ISO" rewrote the spelling, and no
17
+
spelling of that year is admitted.
18
+
19
+
-`@objectstack/spec`: the validation message catalog gains `invalid_date_range` and
20
+
`invalid_datetime_range` in `en`, `zh-CN`, `ja-JP` and `es-ES`. They are two more
21
+
sentences of the `invalid_date` code, never a wire value. The years are the template
22
+
parameters `{{firstYear}}` / `{{lastYear}}`. A deployment that overrides a message
23
+
under `validation.field.invalid_date` or `validation.field.invalid_datetime` does not
24
+
cover these values. To override their text, define
0 commit comments