Sam Chung
Sam Chung
Hey @sinh117801, not quite sure what you mean. How are you running it? Can you give us a example?
> It isn't implemented (#126) > > There is recent activity in #126; let me know if this is the wrong approach. I think the changes contemplated recently in #126...
> ## RFC for datetime methods > The hard problem here is naming the methods such that the validation behavior is clear to everyone. I'm opposed to adding a method...
> @colinhacks It looks like `datetime` accepts the offset as `hh:mm` only, but according to this https://en.wikipedia.org/wiki/UTC_offset `hhmm` should be accepted as well. Some frameworks generate it as `hhmm` by...
> > There is still no .date() or .time() method, mostly because those use cases can be trivially implemented with .regex(). > > @colinhacks Can they though? The trivial implementation...
You could use `preprocess()`? Something like this: ```ts const stringToNumber = (arg: unknown) => { if (typeof arg === 'string') { const number = Number(arg); if (!isNaN(number)) { return number...
tbh if you need to do that many nests you're probably overcomplicating your Zod type. Just my 2c.
Have you guys tried the latest version? If should cover those cases from what I recall
I'll look to raise some PRs just shortly after the new years, in case someone is wondering.
Source Maps are experimental in 12+ and stable from Node.js 14.18. I recommend setting NODE_OPTIONS=--enable-source-maps instead of using this package.