edmundhung / conform

A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
https://conform.guide
MIT License
1.98k stars 107 forks source link

feat(conform-zod): bigint coercion support #726

Closed lifeiscontent closed 1 month ago

lifeiscontent commented 2 months ago

this change follows the same pattern as how booleans are coerced.

it also fixes issues with BigInt where if the value is not of a convertable value it doesn't break the app because BigInt/Symbol throw unlike the rest of the type constructors.

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 43ed54962fa14aff9526685fd1a3a19a8c429408

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ----------------- | ----- | | @conform-to/zod | Minor | | @conform-to/dom | Minor | | @conform-to/react | Minor | | @conform-to/yup | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

lifeiscontent commented 2 months ago

@edmundhung fixed

pkg-pr-new[bot] commented 2 months ago

Open in Stackblitz

More templates

- [@conform-example/chakra-ui](https://pkg.pr.new/template/f138d30b-3655-429f-a0f9-f10c01a0ca3b) - [@conform-example/material-ui](https://pkg.pr.new/template/b6e8109c-c32f-44e9-87a0-27163a845d0c) - [@conform-example/headless-ui](https://pkg.pr.new/template/4dddfbe7-ceed-4363-9e0a-a9205470bdbe) - [@conform-example/nextjs](https://pkg.pr.new/template/0a38880a-2481-4504-ba0e-44e9b5c4d31c) - [@conform-example/react-router](https://pkg.pr.new/template/1753fdb4-f19b-4fa0-b9f7-bb35dc8de080) - [@conform-example/radix-ui](https://pkg.pr.new/template/411009a1-d585-4c06-826d-b01400840214) - [@conform-example/remix](https://pkg.pr.new/template/7f2a625f-267b-4b94-8c28-0ff71620f276) - [@conform-example/shadcn-ui](https://pkg.pr.new/template/2f407f5e-773e-4888-b61b-8c7be95fe8dd)

@conform-to/dom

``` pnpm add https://pkg.pr.new/@conform-to/dom@726 ```

@conform-to/react

``` pnpm add https://pkg.pr.new/@conform-to/react@726 ```

@conform-to/validitystate

``` pnpm add https://pkg.pr.new/@conform-to/validitystate@726 ```

@conform-to/yup

``` pnpm add https://pkg.pr.new/@conform-to/yup@726 ```

@conform-to/zod

``` pnpm add https://pkg.pr.new/@conform-to/zod@726 ```

commit: 43ed549