{"_id":"mantine-form-valibot-resolver","_rev":"4-ca4466d9ed11d5669c2f381ea3d62182","name":"mantine-form-valibot-resolver","dist-tags":{"latest":"3.0.1"},"versions":{"1.0.0":{"name":"mantine-form-valibot-resolver","version":"1.0.0","keywords":["valibot","mantine","form","resolver"],"author":{"name":"Songkeys","email":"songv587@gmail.com"},"license":"MIT","_id":"mantine-form-valibot-resolver@1.0.0","maintainers":[{"name":"songkeys","email":"i@song.work"}],"homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"dist":{"shasum":"25383020e034e5921070c9cc6f43c7e14aac76d2","tarball":"https://registry.npmjs.org/mantine-form-valibot-resolver/-/mantine-form-valibot-resolver-1.0.0.tgz","fileCount":15,"integrity":"sha512-OpqJc3wA17jhcO4FXi0Ku2lfoWnQMN6ExmTUZWBY6TGKY7mfc4v3Bkacacz1CvbYeQ7qOdf+uZLarrjwSoXiVQ==","signatures":[{"sig":"MEUCID1KHQxvsVyXjA5JYwqjwUX0b46FCCzppTpapntze2CUAiEA1+I7SBFRKhHnFX+hl9uO5QqFS/ysf5eX5h58604rETA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11799},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.6.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"a21945062fa31ced99dc100a3a2c201b979f0d6f","scripts":{"lint":"biome check .","test":"vitest","build":"tsup --dts","watch":"tsup --watch","format":"biome format . --write","release":"bumpp","lint:fix":"biome check . --apply","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"songkeys","email":"i@song.work"},"repository":{"url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git","type":"git"},"_npmVersion":"10.2.3","description":"Valibot resolver for @mantine/form validation","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"packageManager":"pnpm@8.12.0","devDependencies":{"tsup":"^8.0.1","bumpp":"^9.2.1","jsdom":"^23.0.1","vitest":"^1.0.4","typescript":"^5.3.3","@types/node":"^20.10.4","@biomejs/biome":"^1.4.1","simple-git-hooks":"^2.9.0","@testing-library/react":"^14.1.2"},"peerDependencies":{"valibot":">=0.24.1","@mantine/form":">=7.0.0"},"simple-git-hooks":{"pre-commit":"npm run format && npm run lint:fix"},"_npmOperationalInternal":{"tmp":"tmp/mantine-form-valibot-resolver_1.0.0_1702463709252_0.7695329855886748","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"mantine-form-valibot-resolver","version":"2.0.0","keywords":["valibot","mantine","form","resolver"],"author":{"name":"Songkeys","email":"songv587@gmail.com"},"license":"MIT","_id":"mantine-form-valibot-resolver@2.0.0","maintainers":[{"name":"songkeys","email":"i@song.work"}],"homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"dist":{"shasum":"79ba5a4e14a32d8faa19039154bba7c0d62d8aaa","tarball":"https://registry.npmjs.org/mantine-form-valibot-resolver/-/mantine-form-valibot-resolver-2.0.0.tgz","fileCount":10,"integrity":"sha512-V/d1QQI/hCnye/wIz90rbvMVkrGj6glqMYvuJU6gu5/34AJsaAJP7OV4fz1XHR7ZX+0F6j0WaVFXYR+e+pgbEA==","signatures":[{"sig":"MEQCIHCKhRxaGS4uJMyYJnnXfcIP3WU5BQ7z03z9v11Tf2xOAiBQm5N7+17U8H+5r99KIW7TtRuS1wTRba+H7Q7XA1X+xQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12259},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.6.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"a29890ba61f2fa5c477a8d77c76dcba1e607d498","scripts":{"lint":"biome check .","test":"node --import=tsimp/import --test **/*.test.ts","build":"tsup --dts","watch":"tsup --watch","format":"biome format . --write","release":"bumpp","lint:fix":"biome check . --apply","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"songkeys","email":"i@song.work"},"repository":{"url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git","type":"git"},"_npmVersion":"10.5.2","description":"Valibot resolver for @mantine/form validation","directories":{},"_nodeVersion":"20.13.1","_hasShrinkwrap":false,"packageManager":"pnpm@9.1.4","devDependencies":{"tsup":"^8.1.0","bumpp":"^9.4.1","jsdom":"^24.1.0","tsimp":"^2.0.11","valibot":"0.31.0-rc.11","typescript":"^5.4.5","@types/node":"^20.14.1","@biomejs/biome":"^1.7.3","simple-git-hooks":"^2.11.1","@testing-library/react":"^16.0.0"},"peerDependencies":{"valibot":">=0.31.0 <1","@mantine/form":">=7.0.0"},"simple-git-hooks":{"pre-commit":"npm run format && npm run lint:fix"},"_npmOperationalInternal":{"tmp":"tmp/mantine-form-valibot-resolver_2.0.0_1717469129400_0.6329684541321767","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"mantine-form-valibot-resolver","version":"2.0.1","keywords":["valibot","mantine","form","resolver"],"author":{"name":"Songkeys","email":"songv587@gmail.com"},"license":"MIT","_id":"mantine-form-valibot-resolver@2.0.1","maintainers":[{"name":"songkeys","email":"i@song.work"}],"homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"dist":{"shasum":"9d1badc6577391b83b447365d53cf3d4295a267b","tarball":"https://registry.npmjs.org/mantine-form-valibot-resolver/-/mantine-form-valibot-resolver-2.0.1.tgz","fileCount":10,"integrity":"sha512-EDPTDyW5dbHxpNMLcCgKYih5J8qde6qtskLjKEqwPnSJVWK8nxUFdKUFz6ltyB1SFqtzCNWH9qPugoGFQdgDcw==","signatures":[{"sig":"MEUCIDwAcWZd+pHE6QI7S+TExsa9woyHo/lyA+XJFj+tsU4EAiEA+mkxNzFbD7zzw+8sFpi0N9vaqaxTLPHI9vQ8+vCaiDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10988},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.6.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"35bccd5dcc7d20d8c51d064a48db760c4f6466c2","scripts":{"lint":"biome check .","test":"node --import=tsimp/import --test **/*.test.ts","build":"tsup --dts","watch":"tsup --watch","format":"biome format . --write","release":"bumpp","lint:fix":"biome check . --apply","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"songkeys","email":"i@song.work"},"repository":{"url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git","type":"git"},"_npmVersion":"10.5.2","description":"Valibot resolver for @mantine/form validation","directories":{},"_nodeVersion":"20.13.1","_hasShrinkwrap":false,"packageManager":"pnpm@9.1.4","devDependencies":{"tsup":"^8.1.0","bumpp":"^9.4.1","jsdom":"^24.1.0","tsimp":"^2.0.11","valibot":"0.31.0-rc.12","typescript":"^5.4.5","@types/node":"^20.14.1","@biomejs/biome":"^1.7.3","simple-git-hooks":"^2.11.1","@testing-library/react":"^16.0.0"},"peerDependencies":{"valibot":">=0.31.0 <1","@mantine/form":">=7.0.0"},"simple-git-hooks":{"pre-commit":"npm run format && npm run lint:fix"},"_npmOperationalInternal":{"tmp":"tmp/mantine-form-valibot-resolver_2.0.1_1717555226744_0.09311851222603185","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"mantine-form-valibot-resolver","version":"3.0.0","keywords":["valibot","mantine","form","resolver"],"author":{"name":"Songkeys","email":"songv587@gmail.com"},"license":"MIT","_id":"mantine-form-valibot-resolver@3.0.0","maintainers":[{"name":"songkeys","email":"i@song.work"}],"homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"dist":{"shasum":"bc6c8896770640292936172b1c5fc1c4277cbe6b","tarball":"https://registry.npmjs.org/mantine-form-valibot-resolver/-/mantine-form-valibot-resolver-3.0.0.tgz","fileCount":10,"integrity":"sha512-SVHnJauM63fncqwmJ5sJiIi6WywcIoPPIG0j3yVg39RKqlIRrIkV1SZg/YvVweB7alz4PLOFfp653IIMaQicDA==","signatures":[{"sig":"MEQCIHV2jjtkFiC1itKaHGDgw9dolPaaL+TqmscTuLJdpquaAiAbIPkHs06kBBllvAfS81yveVZpNEmLp53txfV5+5cxzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11036},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=16.6.0"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"gitHead":"4fbdb0d8e4b16627e56949a119a9c29db1d7f664","scripts":{"lint":"biome check .","test":"node --import=tsimp/import --test **/*.test.ts","build":"tsup --dts","watch":"tsup --watch","format":"biome format . --write","release":"bumpp","lint:fix":"biome check . --apply","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"songkeys","email":"i@song.work"},"repository":{"url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git","type":"git"},"_npmVersion":"10.8.2","description":"Valibot resolver for @mantine/form validation","directories":{},"_nodeVersion":"20.17.0","_hasShrinkwrap":false,"packageManager":"pnpm@9.12.0","devDependencies":{"tsup":"^8.3.0","bumpp":"^9.6.1","jsdom":"^25.0.1","tsimp":"^2.0.11","valibot":"1.0.0-beta.0","typescript":"^5.6.2","@types/node":"^20.16.10","@biomejs/biome":"^1.9.3","simple-git-hooks":"^2.11.1","@testing-library/react":"^16.0.1"},"peerDependencies":{"valibot":">=1.0.0","@mantine/form":">=7.0.0"},"simple-git-hooks":{"pre-commit":"npm run format && npm run lint:fix"},"_npmOperationalInternal":{"tmp":"tmp/mantine-form-valibot-resolver_3.0.0_1728198276893_0.32158627426914665","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"mantine-form-valibot-resolver","version":"3.0.1","description":"Valibot resolver for @mantine/form validation","keywords":["valibot","mantine","form","resolver"],"homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"repository":{"type":"git","url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git"},"license":"MIT","author":{"name":"Songkeys","email":"songv587@gmail.com"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup --dts","lint":"biome check","lint:fix":"biome check --write","prepublishOnly":"npm run build","release":"bumpp","test":"node --import=tsimp/import --test **/*.test.ts","typecheck":"tsc --noEmit","watch":"tsup --watch"},"devDependencies":{"@biomejs/biome":"^1.9.4","@testing-library/react":"^16.0.1","@types/node":"^20.17.2","bumpp":"^9.8.0","jsdom":"^25.0.1","simple-git-hooks":"^2.11.1","tsimp":"^2.0.12","tsup":"^8.3.5","typescript":"^5.6.3","valibot":"1.0.0-beta.2"},"peerDependencies":{"@mantine/form":">=7.0.0","valibot":">=1.0.0 || ^1.0.0-beta || ^1.0.0-rc"},"packageManager":"pnpm@9.12.3","engines":{"node":">=16.6.0"},"simple-git-hooks":{"pre-commit":"npm run lint:fix"},"_id":"mantine-form-valibot-resolver@3.0.1","gitHead":"4c726ff060b773422e8c4e01a58a3cd2f836088e","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-CXm6yi5znCYI52/gXTbGOTCLlsS4Tu343W09FVvY/oMWRLLBoe+dDHznjECTIr9RNRc38Z/qMvQpjIcfHRcIhA==","shasum":"d36833c3a3616eaa83f797a0137f8a7f47244e90","tarball":"https://registry.npmjs.org/mantine-form-valibot-resolver/-/mantine-form-valibot-resolver-3.0.1.tgz","fileCount":10,"unpackedSize":11115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4/JLAifud04MGSUPMVH8kww0bY7X0ne8AoKiFNid5twIhANfYeQSOsG5etQK+qO9WRSD+zNyPCSpC/LcH3l4rk3x5"}]},"_npmUser":{"name":"songkeys","email":"i@song.work"},"directories":{},"maintainers":[{"name":"songkeys","email":"i@song.work"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mantine-form-valibot-resolver_3.0.1_1730177004404_0.08657700791937928"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-13T10:35:09.252Z","modified":"2024-10-29T04:43:24.773Z","1.0.0":"2023-12-13T10:35:09.448Z","2.0.0":"2024-06-04T02:45:29.561Z","2.0.1":"2024-06-05T02:40:26.895Z","3.0.0":"2024-10-06T07:04:37.063Z","3.0.1":"2024-10-29T04:43:24.591Z"},"bugs":{"url":"https://github.com/Songkeys/mantine-form-valibot-resolver/issues"},"author":{"name":"Songkeys","email":"songv587@gmail.com"},"license":"MIT","homepage":"https://github.com/Songkeys/mantine-form-valitbot-resolver#readme","keywords":["valibot","mantine","form","resolver"],"repository":{"type":"git","url":"git+https://github.com/Songkeys/mantine-form-valibot-resolver.git"},"description":"Valibot resolver for @mantine/form validation","maintainers":[{"name":"songkeys","email":"i@song.work"}],"readme":"# mantine-form-valibot-resolver\n\n[![npm version](https://badgen.net/npm/v/mantine-form-valibot-resolver)](https://npm.im/mantine-form-valibot-resolver)\n\n[valibot](https://www.npmjs.com/package/valibot) resolver for [@mantine/form](https://mantine.dev/form/use-form/).\n\n## Installation\n\nWith npm:\n\n```sh\nnpm install valibot mantine-form-valibot-resolver\n```\n\nWith yarn:\n\n```sh\nyarn add valibot mantine-form-valibot-resolver\n```\n\nWith pnpm:\n\n```sh\npnpm add valibot mantine-form-valibot-resolver\n```\n\n## Versions\n\nPeer dependencies:\n\n| mantine-form-valibot-resolver | valibot                                                    | @mantine/form |\n| ----------------------------- | ---------------------------------------------------------- | ------------- |\n| 3.x                           | >=1.0.0 | >=7.0.0       |\n| 2.x                           | [>=0.31.0](https://valibot.dev/guides/migrate-to-v0.31.0/) | >=7.0.0       |\n| 1.x                           | <0.31.0                                                    | >=7.0.0       |\n\n## Usage\n\n### Basic fields validation\n\n```tsx\nimport { useForm } from \"@mantine/form\";\nimport { valibotResolver } from \"mantine-form-valibot-resolver\";\nimport * as v from \"valibot\";\n\nconst schema = v.object({\n  name: v.pipe(\n    v.string(),\n    v.minLength(2, \"Name should have at least 2 letters\")\n  ),\n  email: v.pipe(v.string(), v.email(\"Invalid email\")),\n  age: v.pipe(\n    v.number(),\n    v.minValue(18, \"You must be at least 18 to create an account\")\n  ),\n});\n\nconst form = useForm({\n  initialValues: {\n    name: \"\",\n    email: \"\",\n    age: 16,\n  },\n  validate: valibotResolver(schema),\n});\n\nform.validate();\nform.errors;\n// -> {\n//  name: 'Name should have at least 2 letters',\n//  email: 'Invalid email',\n//  age: 'You must be at least 18 to create an account'\n// }\n```\n\n### Nested fields validation\n\n```tsx\nimport { useForm } from \"@mantine/form\";\nimport { valibotResolver } from \"mantine-form-valibot-resolver\";\nimport * as v from \"valibot\";\n\nconst nestedSchema = v.object({\n  nested: v.object({\n    field: v.pipe(\n      v.string(),\n      v.minLength(2, \"Field should have at least 2 letters\")\n    ),\n  }),\n});\n\nconst form = useForm({\n  initialValues: {\n    nested: {\n      field: \"\",\n    },\n  },\n  validate: valibotResolver(nestedSchema),\n});\n\nform.validate();\nform.errors;\n// -> {\n//  'nested.field': 'Field should have at least 2 letters',\n// }\n```\n\n### List fields validation\n\n```tsx\nimport { useForm } from \"@mantine/form\";\nimport { valibotResolver } from \"mantine-form-valibot-resolver\";\nimport * as v from \"valibot\";\n\nconst listSchema = v.object({\n  list: v.array(\n    v.object({\n      name: v.pipe(\n        v.string(),\n        v.minLength(2, \"Name should have at least 2 letters\")\n      ),\n    })\n  ),\n});\n\nconst form = useForm({\n  initialValues: {\n    list: [{ name: \"\" }],\n  },\n  validate: valibotResolver(listSchema),\n});\n\nform.validate();\nform.errors;\n// -> {\n//  'list.0.name': 'Name should have at least 2 letters',\n// }\n```\n\n### With TypeScript\n\nYou can use the `InferInput` type from the `valibot` library to get the type of the form data.\n\n```tsx\nimport { useForm } from \"@mantine/form\";\nimport { valibotResolver } from \"mantine-form-valibot-resolver\";\nimport * as v from \"valibot\";\n\nexport const userSchema = v.object({\n  email: v.pipe(v.string(), v.email()),\n});\n\ntype FormData = v.InferInput<typeof userSchema>;\n\nconst form = useForm<FormData>({\n  initialValues: {\n    email: \"\",\n  },\n  validate: valibotResolver(userSchema),\n});\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}