We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code:
z.set(z.string().url()).parse(new Set('https://mint.coinos.io'))
Is failing, however, in theory it should be correct, since the schema is "Set of URLs".
Error message:
Uncaught ZodError: [ { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 0 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 1 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 2 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 3 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 4 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 5 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 6 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 7 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 8 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 9 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 10 ] }, { "validation": "url", "code": "invalid_string", "message": "Invalid url", "path": [ 11 ] } ] at Object.get error (file:///home/me/.cache/deno/npm/registry.npmjs.org/zod/3.23.8/lib/index.mjs:587:31) at ZodSet.parse (file:///home/me/.cache/deno/npm/registry.npmjs.org/zod/3.23.8/lib/index.mjs:692:22) at <anonymous>:1:46
The text was updated successfully, but these errors were encountered:
fix: use zod array instead of zod set
6a34f8f
colinhacks/zod#3963
No branches or pull requests
This code:
Is failing, however, in theory it should be correct, since the schema is "Set of URLs".
Error message:
The text was updated successfully, but these errors were encountered: