commonbaseapp / zodex

The missing zod (de)?serialization library
MIT License
38 stars 5 forks source link

Added coerce support #18

Closed miunau closed 2 weeks ago

miunau commented 2 months ago

Added coerce support for string, number, bigint, date, boolean: https://zod.dev/?id=coercion-for-primitives. This is essential for working with form submissions where everything coming in is a string.

Gregoor commented 2 months ago

LGTM, though tests would be nice

miunau commented 2 months ago

Looks like this broke the tests cuz of the new property, I'll fix and add a test

miunau commented 2 months ago

OK works now. @Gregoor mind merging this in? one less patchfile in my repo :)

Gregoor commented 2 months ago

Great! I don't have merge rights here, that would be @heikir