Replies: 1 comment 1 reply
-
You can try this: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I have a value that's expected to be a string format in the data (this is because the input/output are both expected to be strings) but it represents a number in most cases.
Rather than doing
z.string().pipe(z.coerce.number).int().positive().min(1).pipe(z.coerce.string())
is there some way of being able to test a field as a different value without actually converting it?i.e.
z.string().testWithoutTransforming(z.pipe(z.coerce.number()).int().positive().min(1))
?Beta Was this translation helpful? Give feedback.
All reactions