-
-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Report a bug
🔎 Search Terms
string.date
####Description
When using multiple "string.date" fields in an object schema, Arktype validates only one of them. The first invalid date triggers an error, but any additional invalid date fields are silently ignored.
🧩 Context
System:
OS: Linux 6.17 Arch Linux
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 22.02 GB / 31.26 GB
Container: Yes
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.1 - /usr/bin/node
npm: 11.6.4 - /usr/bin/npm
pnpm: 10.23.0 - /usr/bin/pnpm
npmPackages:
@ark/schema: 0.55.0
@ark/util: 0.55.0
arktype: ^2.1.27 => 2.1.27
typescript: ^5.9.3 => 5.9.3 // Paste reproduction code here
import { type } from "arktype"
const Dates = type({
date1: "string.date",
date2: "string.date",
date3: "string.date",
})
const out = Dates({
date1: "",
date2: "",
date3: "",
})
if (out instanceof type.errors) {
console.error(out.summary)
} else {
console.log(`date1, ${out.date1}`)
console.log(`date2, ${out.date2}`)
console.log(`date3, ${out.date3}`)
}- result:
$ npx tsx ./index.ts
date1 must be a parsable date (was "")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done (merged or closed)