ménard - I'm thinking of something like:typesc...
Haddok - Hi everyone , i have to use zod in my ...
doug4794 - I have this login schema and want to...
QBit - Form should not accept decimal nos. For...
ID: z.coerce.number().int().positive().finite()
ID: z.coerce.number().int().positive().finite()
Bence (Arzen) - Hey guys 🙂I have a (might be)...
Gludek - Hey,I have objects like this (there's...
adxvcasas - How to set a default value for opti...
Gludek - Just to confirm z.string().email() can...
z.string().email()
can't be combined with .nullish()
right?const schema = z.literal("").or(z.string().email());
const schema = z.literal("").or(z.string().email());
adxvcasas - Hello, so right now I have checkbox...
Field "doesHaveTCETAssitance" in model "AppoinmentSchedule" can't be a list. The current connector does not support lists of primitive types.Prisma
, because I set doesHaveTCETAssitance to doesHaveTCETAssitance String[]
which is not supported by prisma mysql.
```...shadi - hey everyone, i've been struggling with...
squibler. - Hi folks. I'm looking to validate a...
not in
a blacklist - like for example swear words. Enum does this for allowed strings, but I'm struggling to find something that will work for disallowed strings.
I have tried a regex - but my datasource has over 2000 disallowed words and regex would be too slow.
Basically I'm looking for something like:...adxvcasas - Hello everyone, How can I make the ...
dryRunDate
,dryRunStart
and dryRunEnd
dynamic?
so I have a type
who have a value of yes and no. Is it possible to make dryRunDate
,dryRunStart
and dryRunEnd
required if the user select yes
from type
?
this is my zod...Gludek - Heey, can I somehow extend/merge discr...
k9 - Is it expected that Zod would cause such a...
NODE_OPTIONS=--max-old-space-size=350
. But now the compilation phase dies with this error:...k9 - Hello! I'm getting up to speed. The Comple...
``ts
type GameId =
g${string}`;
const isGameId = (value: unknown): value is GameId => {...ramblings - Is there a way to make one field re...
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1219647395717972059/image.png)
Việt An - How to get better error messages?I h...
z.union([z.literal('Conan'), z.literal('Jordan'), z.literal('Sona')])
, when the value is not any of that, the default error message I get is Invalid literal value, expected "Conan"
, but I want it to say something like ...expected "Conan", "Jordan" or "Sona"
. How can I do that?...z.union
is similar to z.object
or z.array
in that is a kind of "container" schema that runs the interior schemas and collects any errors.Aidan647 - how can I validate other1 and other2...
other1
and other2
? (function validation is optional)
```ts
type demoFunction = {
(data: string): number[]
other1: number...Aidan647 - how can I do validation of zod in zo...