jquense / yup

Dead simple Object schema validation
MIT License
22.94k stars 935 forks source link

feat(string): Create .datetime() #2087

Closed 0livare closed 9 months ago

0livare commented 1 year ago

yup.date() always attempts to parse input into a Date object. Sometimes that is undesirable and you just want the string to be left alone. Currently yup does not have a solution for that use case, but that's where .datetime() comes in!

With an API inspired by zod.datetime, datetime also provides greater control over the exact required format of the ISO string than date does.

0livare commented 1 year ago

@jquense is this something you would consider?

jquense commented 1 year ago

yes open to this 👍

0livare commented 11 months ago

@jquense Just a heads up that I believe I have addressed both of your comments!

jquense commented 9 months ago

@0livare sorry this is taking so long but can you fix the build?

0livare commented 9 months ago

@jquense build is fixed! (no changes, I just rebased onto the latest master)

jquense commented 9 months ago

thanks!