{"_id":"@artizon/zod-formik-adapter","name":"@artizon/zod-formik-adapter","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@artizon/zod-formik-adapter","version":"1.0.0","description":"A fork of @robertLichtnow's zod-formik-adapter. Compatible with React v18 and zod v3","main":"./dist/index.js","author":{"name":"Ming Sum Sze","email":"mingsum.sam@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/artizon-io/zod-formik-adapter"},"scripts":{"build":"tsc","test":"jest --coverage","test:ci":"jest --ci --coverage","build:clean":"rm -rf dist && yarn build"},"devDependencies":{"@types/jest":"^27.0.1","formik":"^2","jest":"^27.0.6","react":"^18","semantic-release":"^17.4.5","ts-jest":"^27.0.4","typescript":"~4.6.3","zod":"^3"},"peerDependencies":{"formik":"^2","react":"^18","zod":"^3"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"licenseText":"MIT License\n\nCopyright (c) 2022 Ming Sum Sze\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@artizon/zod-formik-adapter@1.0.0","dist":{"shasum":"064836e53c4fa4a54cb6094be72bc07d85478dad","integrity":"sha512-P+NOLEoAdhO3MjwZAoHV4SeEtowhXFZ/NkUViIaMaJv0JfhlxUPH6OYVZWiIc0r/rLVPPcFL9v6t87etWd83Zw==","tarball":"https://registry.npmjs.org/@artizon/zod-formik-adapter/-/zod-formik-adapter-1.0.0.tgz","fileCount":11,"unpackedSize":254597,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRrMb8kwuLaaDS6I8cHUjjK1idB4NXCyFNV6rvi/UzqQIgKSiwM+7mvin1LSyTkyvCGRMyfNDNFFTMo6nr0Kl/tPA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKrmuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnuQ/8CMfsJqGfLAW/JLcDdfhHaU8ro0IxEydkOIWRGOmevcyC5J7F\r\n9JgaHH0F/ExaxB05c7KEExUmdKYY56S+6sdF8mDmHjPA7ch/pj70PcBWfpxU\r\nk3nE420thEzq4bTJ9NcD10DEoFKpBbMPpSYT10BSC4Wb6Ztsf1yVUcd9IHUi\r\nAxp/POnn7tB3CSwLuX0yJTLi1BoMqGvZgx0kEgdju630cl0jrWea5v9099JM\r\n12yVCRKWp/d2wgghWi6+MdaNPMzHHF4TQ6dVInA1quPcFlbWUS90WpF9THGK\r\nlsAsnjyMstU5Ip3dRPTxMI7NYOd9u+zqxWTPPPGqFaOGiUPLgi8e7XiF07dF\r\nlQf5PklS70IV1UH7kSNrdDo9d5poq29XDFtDeB9B+AGpBIDjqOUp4mI+SdTX\r\nF8h3eq3z11TnJlzkEklqgDkvvO6YzaWqWZLGs3jcNQoHlUEE8Htx5pOty5sK\r\nmqmWyUvkhVE7M7GTUPTrBYicFwY0k92393W9n7OxvEmYLHBF39I9EVDimENs\r\nheGnLIk5mlBL0FdmjHEuYYCXSujCztnQxE1EHbuVsSI8Ulq50BBe0W6rm+In\r\n+8y/DUPk3PwV+BUo8SGyFT1TzymejEBfzW6lJ8H0w+HJ7tYVrkn2mtWBV55M\r\nWY1lAVnsIHQl0/6yL2XuewaR645E1HUedVw=\r\n=6jBg\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"artizon","email":"mingsum.sam@gmail.com"},"directories":{},"maintainers":[{"name":"artizon","email":"mingsum.sam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zod-formik-adapter_1.0.0_1663744430129_0.23217415578043132"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-21T07:13:50.044Z","1.0.0":"2022-09-21T07:13:50.337Z","modified":"2022-09-21T07:13:50.460Z"},"maintainers":[{"name":"artizon","email":"mingsum.sam@gmail.com"}],"description":"A fork of @robertLichtnow's zod-formik-adapter. Compatible with React v18 and zod v3","repository":{"type":"git","url":"https://github.com/artizon-io/zod-formik-adapter"},"author":{"name":"Ming Sum Sze","email":"mingsum.sam@gmail.com"},"license":"MIT","readme":"# [FORK] zod-formik-adapter\n\nA fork of @robertLichtnow's zod-formik-adapter. Compatible with React v18 and zod v3\n\nThis library adapts a [zod](https://www.npmjs.com/package/zod) schema to work as a `validationSchema` prop on [Formik](https://www.npmjs.com/package/formik)\n\n**IMPORTANT: Currently, this library does not work with zod union. See more [here](https://github.com/robertLichtnow/zod-formik-adapter/issues/2).**\n\n## Install\n\n```sh\n# npm\n$ npm install zod-formik-adapter\n\n# yarn\n$ yarn add zod-formik-adapter\n```\n\n## Usage\n\n```TSX\nimport { z } from 'zod';\nimport { Formik } from 'formik';\nimport { toFormikValidationSchema } from 'zod-formik-adapter';\n\nconst Schema = z.object({\n  name: z.string(),\n  age: z.number(),\n});\n\nconst Component = () => (\n  <Formik\n    validationSchema={toFormikValidationSchema(Schema)}\n  >\n    {...}\n  </Formik>\n);\n```\n","readmeFilename":"README.md"}