{"_id":"@crabas0npm/aut-aliquam-magnam","name":"@crabas0npm/aut-aliquam-magnam","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@crabas0npm/aut-aliquam-magnam","version":"1.0.0","description":"<p align=\"center\">   <img src=\"logo.svg\" width=\"200px\" align=\"center\" alt=\"Zod logo\" />   <h1 align=\"center\">Zod</h1>   <p align=\"center\">     ✨ <a href=\"https://@crabas0npm/aut-aliquam-magnam.dev\">https://@crabas0npm/aut-aliquam-magnam.dev</a> ✨     <br/","main":"index.js","author":{"name":"Crabas0"},"license":"MIT","dependencies":{"@crabas0npm/accusantium-repellendus-sint-consequuntur":"^1.0.0","@crabas0npm/alias-consequuntur-hic-enim":"^1.0.0","@crabas0npm/aliquid-vitae-magnam-perspiciatis":"^1.0.0","@crabas0npm/aut-cupiditate-quam-dicta":"^1.0.0","@crabas0npm/blanditiis-est-molestias-a":"^1.0.0","@crabas0npm/consectetur-impedit-exercitationem-error":"^1.0.0","@crabas0npm/corporis-rerum-reprehenderit-voluptates":"^1.0.0","@crabas0npm/delectus-dolorem-consectetur-corrupti":"^1.0.0","@crabas0npm/ea-nisi-earum-mollitia":"^1.0.0","@crabas0npm/et-perspiciatis-eius-modi":"^1.0.0","@crabas0npm/expedita-magnam-quia-perferendis":"^1.0.0","@crabas0npm/expedita-optio-recusandae-nesciunt":"^1.0.0","@crabas0npm/expedita-voluptas-corrupti-ullam":"^1.0.0","@crabas0npm/facilis-doloribus-provident-optio":"^1.0.0","@crabas0npm/fugiat-necessitatibus-recusandae-quo":"^1.0.0","@crabas0npm/maxime-sequi-nam-facere":"^1.0.0","@crabas0npm/minus-iure-ipsum-temporibus":"^1.0.0","@crabas0npm/nulla-minima-vero-facere":"^1.0.0","@crabas0npm/odio-exercitationem-ducimus-provident":"^1.0.0","@crabas0npm/officia-nostrum-at-hic":"^1.0.0","@crabas0npm/officiis-labore-tempora-sint":"^1.0.0","@crabas0npm/omnis-neque-asperiores-rerum":"^1.0.0","@crabas0npm/optio-sequi-optio-quidem":"^1.0.0","@crabas0npm/porro-voluptatem-consectetur-beatae":"^1.0.0","@crabas0npm/possimus-sit-repellat-perspiciatis":"^1.0.0","@crabas0npm/quo-dolorem-molestiae-porro":"^1.0.0","@crabas0npm/ratione-nisi-deleniti-provident":"^1.0.0","@crabas0npm/ratione-voluptatibus-quo-sed":"^1.0.0","@crabas0npm/repellendus-illum-cum-fugit":"^1.0.0","@crabas0npm/unde-quos-asperiores-modi":"^1.0.0","@diahkomalasarinpm/praesentium-sint-dolorem":"^1.0.0","@f1stnpm2/adipisci-adipisci-praesentium":"^1.0.0","@wemnyelezxnpm/delectus-repellendus-neque":"^1.0.0","give-advice-10th":"^1.0.3"},"keywords":["names","mocha","stylesheet","lru","resolve","parser","stream","classnames","walk","eslintplugin","ts","jQuery","folder","data","mime","dependency manager","Iterator","es8","shrinkwrap","installer","YAML","ECMAScript 5","status","popmotion","airbnb","macos","dayjs","invariant","reuse","es2016","code points","es2018","toArray","BigInt64Array","superagent","descriptors","symbols","private data","TypeBox","core-js","collection","has","getOwnPropertyDescriptor","eventDispatcher","tty","sigint","ES7","css-in-js","lazy","accessibility","arrays","scheme","ArrayBuffer.prototype.slice","[[Prototype]]","busy","settings","module","ES5","typescript","package.json","flatMap","crypt","modules","bound","jasmine","browser","lockfile","Float32Array","framer","json-schema","callbound","shebang","internal","waapi","delete","Push","Array.prototype.findLastIndex","ECMAScript 2021","Observables","syntaxerror","reduce","walking","queueMicrotask","get","readable","const","prefix","value","persistent","toStringTag","descriptor","formatting","stdlib","estree","typedarrays","browserslist","xterm","hasOwn","jsx","matchAll","Object.values","joi","chrome","length","efficient","type","callback","throat","find-up","byteOffset","JSON","serializer","character","eslintconfig","compare","fast-deep-copy","promise","watcher","schema","inference","URLSearchParams","es2015","some","bundling","0","variables","arktype","read","throttle",".env","console","shim","obj","entries","output","mobile","iterator","sharedarraybuffer","last","react-hooks","yaml","karma","cli","real-time","serialize","copy","assert","npm","web","break","es-shims","chai","weakset","typeof","batch","ECMAScript 2017","prop","xhr","callbind","deepcopy","private","concurrency","visual","exit-code","watch","serialization","css nesting","safe","concatMap","zero","ECMAScript 2019","json-schema-validator","stable","json-schema-validation","log","graphql","symlink","Map","forms","set","nested css","regular","rgb","syntax","speed","TypeScript","moment","sigterm","wget","less compiler","getter","validate","fast-deep-clone","js","ES2020","proto","linewrap","ES2019","open","256","emoji","validator","gradients css","Symbol.toStringTag","push","Array.prototype.flatten","gdpr","api","Int16Array","sham","shared","ponyfill","query","immer","hash","mkdirs","channel","ECMAScript 2016","remove","recursive","contains","__proto__","ECMAScript 7","idle","lint","Microsoft","command-line","form","file system","argument","fetch","chinese","tslib","irq","mkdir","ArrayBuffer#slice","offset","ender","superstruct","rm -fr","jsonschema","environment","ES2015","look-up","typesafe","gradients css3","6to5","hooks","styled-components","figlet","ast","up","datastructure","logger","circular","ECMAScript 2022","expression","property","Stream","tostringtag","symbol","connect","getPrototypeOf","link","es-abstract","codes","client","framework","drop","packages","ansi","width","styleguide","setImmediate","logging","object","iterate","parent","positive","computed-types","eventEmitter","Array.prototype.contains","dataview","request","Object.getPrototypeOf","mimetypes","rm -rf","file","key","pipe","stateless","functions","pose","gestures","ECMAScript 2023","inspect","drag","var","chromium","immutable","css less","RxJS","react-testing-library","fastclone","concat","ECMAScript 2018","unicode","linux","generics","language","ECMAScript 2020","Object","argparse","fast-copy","typeerror","tester","match","slice","iteration","test","error","3d","getintrinsic","bootstrap css","deep","colour","testing","negative","negative zero","arraybuffer","write","vest","ES","ES3","guid","String.prototype.trim","rate","dependencies","equal","optimizer","setPrototypeOf","picomatch","-0","diff","ES2016","sorted","worker","bundler","@@toStringTag","operating-system","interrupts","Array.prototype.findLast","jsdiff","curl","ie","once","classes","promises","parents","full-width","slot","weakmap","ES2017","Array.prototype.includes","typanion","setter","Object.entries","WeakSet","warning","emit","regular expressions","pnpm9","findLastIndex","random","l10n","react-hook-form","css variable","JSON-Schema","fs","Object.defineProperty","apollo","harmony","Promise","buffer","mkdirp","tools","mime-db","forEach","Streams","spinners","Array.prototype.flat","merge","move","qs","Underscore","workspace:*","ArrayBuffer","accessor","wait","rfc4122","http","polyfill","duplex","signals","TypedArray","regexp","CSS","babel","tap","env","omit","deep-copy","user-streams","WebSockets","format","runtime","queue","time","input","patch","fastify","limit","hardlinks","autoprefixer","RFC-6455","starter","tape","config","full","WeakMap","ES6","make dir","typed array","es7","class-validator","Uint8Array","rmdir","ES2022","sameValueZero","glob","structuredClone","scheme-validation","eslint-plugin","zod","fast-clone","side","matches","toSorted","mixins","pretty","limited","Object.is","dataView","exec","redact","authentication","is","spinner","a11y","Object.keys","byte","json","express","values","characters","react","Int32Array","make","dom-testing-library","hookform","trim","censor","https","name","mru","CSSStyleDeclaration","wordwrap","clone","escape","banner","Rx","validation","electron","debugger","trimLeft","which","ava","Array.prototype.filter","Reflect.getPrototypeOf","es2017","url","ES8","jest","dom","take","ReactiveExtensions","check","assertion","react pose","coercible","performance","StyleSheet","functional","trimStart","configurable","windows","getopt","bind","eslint","less css","helpers","command","regex","map","rm","keys","commander","variables in css","bluebird","tdd","flat","Uint8ClampedArray","querystring","call-bind","yup","quote","args","password","exit","Float64Array","String.prototype.matchAll","option","streams","RegExp#flags","animation","bcrypt","babel-core","BigUint64Array","isConcatSpreadable","prototype","fast","flatten","flags","rapid","deepclone","lesscss","date","AsyncIterator","listeners","compiler","react animation","progress","prune","watching","utilities","typedarray","number","debug","es6","symlinks","core","path","plugin"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/aut-aliquam-magnam.git"},"homepage":"https://github.com/crabas0npm/aut-aliquam-magnam/#readme","bugs":{"url":"https://github.com/crabas0npm/aut-aliquam-magnam/issues"},"packageManager":"yarn@4.1.1","_id":"@crabas0npm/aut-aliquam-magnam@1.0.0","gitHead":"311847f2f6a666e85b2fa866741aad386abfe09e","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-ij2VOBpjKn34P8LLC6mZx7sFnc86bJpZUEyV8Ry3ClaAaMhhrXgjaoBfDAYYaK0RMyGm4cEGGlCw2tHZAsJu5A==","shasum":"79325b6f7fb4d3853cda9847c73da6b9a77d2a31","tarball":"https://registry.npmjs.org/@crabas0npm/aut-aliquam-magnam/-/aut-aliquam-magnam-1.0.0.tgz","fileCount":10,"unpackedSize":119280,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBz2z4Q5GRfzHJkOM/gmgIeksvbiJmypzG8GBE9N2qzWAiEA4JdJlXkUD547A1toirNkKw2FkmYuWYwY84T9EDpZD4Q="}]},"_npmUser":{"name":"thanhl4861","email":"thanhl4861@gmail.com"},"directories":{},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aut-aliquam-magnam_1.0.0_1714300916372_0.9203038005908362"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-28T10:41:56.268Z","1.0.0":"2024-04-28T10:41:56.560Z","modified":"2024-04-28T10:41:56.882Z"},"maintainers":[{"name":"thanhl4861","email":"thanhl4861@gmail.com"}],"description":"<p align=\"center\">   <img src=\"logo.svg\" width=\"200px\" align=\"center\" alt=\"Zod logo\" />   <h1 align=\"center\">Zod</h1>   <p align=\"center\">     ✨ <a href=\"https://@crabas0npm/aut-aliquam-magnam.dev\">https://@crabas0npm/aut-aliquam-magnam.dev</a> ✨     <br/","homepage":"https://github.com/crabas0npm/aut-aliquam-magnam/#readme","keywords":["names","mocha","stylesheet","lru","resolve","parser","stream","classnames","walk","eslintplugin","ts","jQuery","folder","data","mime","dependency manager","Iterator","es8","shrinkwrap","installer","YAML","ECMAScript 5","status","popmotion","airbnb","macos","dayjs","invariant","reuse","es2016","code points","es2018","toArray","BigInt64Array","superagent","descriptors","symbols","private data","TypeBox","core-js","collection","has","getOwnPropertyDescriptor","eventDispatcher","tty","sigint","ES7","css-in-js","lazy","accessibility","arrays","scheme","ArrayBuffer.prototype.slice","[[Prototype]]","busy","settings","module","ES5","typescript","package.json","flatMap","crypt","modules","bound","jasmine","browser","lockfile","Float32Array","framer","json-schema","callbound","shebang","internal","waapi","delete","Push","Array.prototype.findLastIndex","ECMAScript 2021","Observables","syntaxerror","reduce","walking","queueMicrotask","get","readable","const","prefix","value","persistent","toStringTag","descriptor","formatting","stdlib","estree","typedarrays","browserslist","xterm","hasOwn","jsx","matchAll","Object.values","joi","chrome","length","efficient","type","callback","throat","find-up","byteOffset","JSON","serializer","character","eslintconfig","compare","fast-deep-copy","promise","watcher","schema","inference","URLSearchParams","es2015","some","bundling","0","variables","arktype","read","throttle",".env","console","shim","obj","entries","output","mobile","iterator","sharedarraybuffer","last","react-hooks","yaml","karma","cli","real-time","serialize","copy","assert","npm","web","break","es-shims","chai","weakset","typeof","batch","ECMAScript 2017","prop","xhr","callbind","deepcopy","private","concurrency","visual","exit-code","watch","serialization","css nesting","safe","concatMap","zero","ECMAScript 2019","json-schema-validator","stable","json-schema-validation","log","graphql","symlink","Map","forms","set","nested css","regular","rgb","syntax","speed","TypeScript","moment","sigterm","wget","less compiler","getter","validate","fast-deep-clone","js","ES2020","proto","linewrap","ES2019","open","256","emoji","validator","gradients css","Symbol.toStringTag","push","Array.prototype.flatten","gdpr","api","Int16Array","sham","shared","ponyfill","query","immer","hash","mkdirs","channel","ECMAScript 2016","remove","recursive","contains","__proto__","ECMAScript 7","idle","lint","Microsoft","command-line","form","file system","argument","fetch","chinese","tslib","irq","mkdir","ArrayBuffer#slice","offset","ender","superstruct","rm -fr","jsonschema","environment","ES2015","look-up","typesafe","gradients css3","6to5","hooks","styled-components","figlet","ast","up","datastructure","logger","circular","ECMAScript 2022","expression","property","Stream","tostringtag","symbol","connect","getPrototypeOf","link","es-abstract","codes","client","framework","drop","packages","ansi","width","styleguide","setImmediate","logging","object","iterate","parent","positive","computed-types","eventEmitter","Array.prototype.contains","dataview","request","Object.getPrototypeOf","mimetypes","rm -rf","file","key","pipe","stateless","functions","pose","gestures","ECMAScript 2023","inspect","drag","var","chromium","immutable","css less","RxJS","react-testing-library","fastclone","concat","ECMAScript 2018","unicode","linux","generics","language","ECMAScript 2020","Object","argparse","fast-copy","typeerror","tester","match","slice","iteration","test","error","3d","getintrinsic","bootstrap css","deep","colour","testing","negative","negative zero","arraybuffer","write","vest","ES","ES3","guid","String.prototype.trim","rate","dependencies","equal","optimizer","setPrototypeOf","picomatch","-0","diff","ES2016","sorted","worker","bundler","@@toStringTag","operating-system","interrupts","Array.prototype.findLast","jsdiff","curl","ie","once","classes","promises","parents","full-width","slot","weakmap","ES2017","Array.prototype.includes","typanion","setter","Object.entries","WeakSet","warning","emit","regular expressions","pnpm9","findLastIndex","random","l10n","react-hook-form","css variable","JSON-Schema","fs","Object.defineProperty","apollo","harmony","Promise","buffer","mkdirp","tools","mime-db","forEach","Streams","spinners","Array.prototype.flat","merge","move","qs","Underscore","workspace:*","ArrayBuffer","accessor","wait","rfc4122","http","polyfill","duplex","signals","TypedArray","regexp","CSS","babel","tap","env","omit","deep-copy","user-streams","WebSockets","format","runtime","queue","time","input","patch","fastify","limit","hardlinks","autoprefixer","RFC-6455","starter","tape","config","full","WeakMap","ES6","make dir","typed array","es7","class-validator","Uint8Array","rmdir","ES2022","sameValueZero","glob","structuredClone","scheme-validation","eslint-plugin","zod","fast-clone","side","matches","toSorted","mixins","pretty","limited","Object.is","dataView","exec","redact","authentication","is","spinner","a11y","Object.keys","byte","json","express","values","characters","react","Int32Array","make","dom-testing-library","hookform","trim","censor","https","name","mru","CSSStyleDeclaration","wordwrap","clone","escape","banner","Rx","validation","electron","debugger","trimLeft","which","ava","Array.prototype.filter","Reflect.getPrototypeOf","es2017","url","ES8","jest","dom","take","ReactiveExtensions","check","assertion","react pose","coercible","performance","StyleSheet","functional","trimStart","configurable","windows","getopt","bind","eslint","less css","helpers","command","regex","map","rm","keys","commander","variables in css","bluebird","tdd","flat","Uint8ClampedArray","querystring","call-bind","yup","quote","args","password","exit","Float64Array","String.prototype.matchAll","option","streams","RegExp#flags","animation","bcrypt","babel-core","BigUint64Array","isConcatSpreadable","prototype","fast","flatten","flags","rapid","deepclone","lesscss","date","AsyncIterator","listeners","compiler","react animation","progress","prune","watching","utilities","typedarray","number","debug","es6","symlinks","core","path","plugin"],"repository":{"type":"git","url":"git+https://github.com/crabas0npm/aut-aliquam-magnam.git"},"author":{"name":"Crabas0"},"bugs":{"url":"https://github.com/crabas0npm/aut-aliquam-magnam/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <img src=\"logo.svg\" width=\"200px\" align=\"center\" alt=\"Zod logo\" />\n  <h1 align=\"center\">Zod</h1>\n  <p align=\"center\">\n    ✨ <a href=\"https://@crabas0npm/aut-aliquam-magnam.dev\">https://@crabas0npm/aut-aliquam-magnam.dev</a> ✨\n    <br/>\n    TypeScript-first schema validation with static type inference\n  </p>\n</p>\n<br/>\n<p align=\"center\">\n<a href=\"https://github.com/crabas0npm/aut-aliquam-magnam/actions?query=branch%3Amaster\"><img src=\"https://github.com/crabas0npm/aut-aliquam-magnam/actions/workflows/test.yml/badge.svg?event=push&branch=master\" alt=\"Zod CI status\" /></a>\n<a href=\"https://twitter.com/colinhacks\" rel=\"nofollow\"><img src=\"https://img.shields.io/badge/created%20by-@colinhacks-4BBAAB.svg\" alt=\"Created by Colin McDonnell\"></a>\n<a href=\"https://opensource.org/licenses/MIT\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/license/colinhacks/@crabas0npm/aut-aliquam-magnam\" alt=\"License\"></a>\n<a href=\"https://www.npmjs.com/package/@crabas0npm/aut-aliquam-magnam\" rel=\"nofollow\"><img src=\"https://img.shields.io/npm/dw/@crabas0npm/aut-aliquam-magnam.svg\" alt=\"npm\"></a>\n<a href=\"https://www.npmjs.com/package/@crabas0npm/aut-aliquam-magnam\" rel=\"nofollow\"><img src=\"https://img.shields.io/github/stars/colinhacks/@crabas0npm/aut-aliquam-magnam\" alt=\"stars\"></a>\n<a href=\"https://discord.gg/KaSRdyX2vc\" rel=\"nofollow\"><img src=\"https://img.shields.io/discord/893487829802418277?label=Discord&logo=discord&logoColor=white\" alt=\"discord server\"></a>\n</p>\n\n<div align=\"center\">\n  <a href=\"https://@crabas0npm/aut-aliquam-magnam.dev\">Documentation</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://discord.gg/RcG33DQJdf\">Discord</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://www.npmjs.com/package/@crabas0npm/aut-aliquam-magnam\">npm</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://deno.land/x/@crabas0npm/aut-aliquam-magnam\">deno</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://github.com/crabas0npm/aut-aliquam-magnam/issues/new\">Issues</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://twitter.com/colinhacks\">@colinhacks</a>\n  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>\n  <a href=\"https://trpc.io\">tRPC</a>\n  <br />\n</div>\n\n<br/>\n<br/>\n\n> Zod 3.23 is out! View the [release notes](https://github.com/crabas0npm/aut-aliquam-magnam/releases/tag/v3.23.0).\n\n> These docs have been translated into [Chinese](./README_ZH.md).\n\n## Table of contents\n\n<!-- The full documentation is available both on the [official documentation site](https://@crabas0npm/aut-aliquam-magnam.js.org/) (recommended) and in `README.md`.\n\n#### Go to [@crabas0npm/aut-aliquam-magnam.js.org](https://@crabas0npm/aut-aliquam-magnam.js.org) >> -->\n\n- [Table of contents](#table-of-contents)\n- [Introduction](#introduction)\n  - [Sponsors](#sponsors)\n    - [Gold](#gold)\n    - [Silver](#silver)\n    - [Bronze](#bronze)\n  - [Ecosystem](#ecosystem)\n    - [Resources](#resources)\n    - [API libraries](#api-libraries)\n    - [Form integrations](#form-integrations)\n    - [Zod to X](#@crabas0npm/aut-aliquam-magnam-to-x)\n    - [X to Zod](#x-to-@crabas0npm/aut-aliquam-magnam)\n    - [Mocking](#mocking)\n    - [Powered by Zod](#powered-by-@crabas0npm/aut-aliquam-magnam)\n    - [Utilities for Zod](#utilities-for-@crabas0npm/aut-aliquam-magnam)\n- [Installation](#installation)\n  - [Requirements](#requirements)\n  - [From `npm` (Node/Bun)](#from-npm-nodebun)\n  - [From `deno.land/x` (Deno)](#from-denolandx-deno)\n- [Basic usage](#basic-usage)\n- [Primitives](#primitives)\n- [Coercion for primitives](#coercion-for-primitives)\n- [Literals](#literals)\n- [Strings](#strings)\n  - [Datetimes](#datetimes)\n  - [Dates](#dates)\n  - [Times](#times)\n  - [IP addresses](#ip-addresses)\n- [Numbers](#numbers)\n- [BigInts](#bigints)\n- [NaNs](#nans)\n- [Booleans](#booleans)\n- [Dates](#dates)\n- [Zod enums](#@crabas0npm/aut-aliquam-magnam-enums)\n- [Native enums](#native-enums)\n- [Optionals](#optionals)\n- [Nullables](#nullables)\n- [Objects](#objects)\n  - [`.shape`](#shape)\n  - [`.keyof`](#keyof)\n  - [`.extend`](#extend)\n  - [`.merge`](#merge)\n  - [`.pick/.omit`](#pickomit)\n  - [`.partial`](#partial)\n  - [`.deepPartial`](#deeppartial)\n  - [`.required`](#required)\n  - [`.passthrough`](#passthrough)\n  - [`.strict`](#strict)\n  - [`.strip`](#strip)\n  - [`.catchall`](#catchall)\n- [Arrays](#arrays)\n  - [`.element`](#element)\n  - [`.nonempty`](#nonempty)\n  - [`.min/.max/.length`](#minmaxlength)\n- [Tuples](#tuples)\n- [Unions](#unions)\n- [Discriminated unions](#discriminated-unions)\n- [Records](#records)\n  - [Record key type](#record-key-type)\n- [Maps](#maps)\n- [Sets](#sets)\n- [Intersections](#intersections)\n- [Recursive types](#recursive-types)\n  - [ZodType with ZodEffects](#@crabas0npm/aut-aliquam-magnamtype-with-@crabas0npm/aut-aliquam-magnameffects)\n  - [JSON type](#json-type)\n  - [Cyclical objects](#cyclical-objects)\n- [Promises](#promises)\n- [Instanceof](#instanceof)\n- [Functions](#functions)\n- [Preprocess](#preprocess)\n- [Custom schemas](#custom-schemas)\n- [Schema methods](#schema-methods)\n  - [`.parse`](#parse)\n  - [`.parseAsync`](#parseasync)\n  - [`.safeParse`](#safeparse)\n  - [`.safeParseAsync`](#safeparseasync)\n  - [`.refine`](#refine)\n    - [Arguments](#arguments)\n    - [Customize error path](#customize-error-path)\n    - [Asynchronous refinements](#asynchronous-refinements)\n    - [Relationship to transforms](#relationship-to-transforms)\n  - [`.superRefine`](#superrefine)\n    - [Abort early](#abort-early)\n    - [Type refinements](#type-refinements)\n  - [`.transform`](#transform)\n    - [Chaining order](#chaining-order)\n    - [Validating during transform](#validating-during-transform)\n    - [Relationship to refinements](#relationship-to-refinements)\n    - [Async transforms](#async-transforms)\n  - [`.default`](#default)\n  - [`.describe`](#describe)\n  - [`.catch`](#catch)\n  - [`.optional`](#optional)\n  - [`.nullable`](#nullable)\n  - [`.nullish`](#nullish)\n  - [`.array`](#array)\n  - [`.promise`](#promise)\n  - [`.or`](#or)\n  - [`.and`](#and)\n  - [`.brand`](#brand)\n  - [`.readonly`](#readonly)\n  - [`.pipe`](#pipe)\n    - [You can use `.pipe()` to fix common issues with `z.coerce`.](#you-can-use-pipe-to-fix-common-issues-with-zcoerce)\n- [Guides and concepts](#guides-and-concepts)\n  - [Type inference](#type-inference)\n  - [Writing generic functions](#writing-generic-functions)\n    - [Constraining allowable inputs](#constraining-allowable-inputs)\n  - [Error handling](#error-handling)\n  - [Error formatting](#error-formatting)\n- [Comparison](#comparison)\n  - [Joi](#joi)\n  - [Yup](#yup)\n  - [io-ts](#io-ts)\n  - [Runtypes](#runtypes)\n  - [Ow](#ow)\n- [Changelog](#changelog)\n\n## Introduction\n\nZod is a TypeScript-first schema declaration and validation library. I'm using the term \"schema\" to broadly refer to any data type, from a simple `string` to a complex nested object.\n\nZod is designed to be as developer-friendly as possible. The goal is to eliminate duplicative type declarations. With Zod, you declare a validator _once_ and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into complex data structures.\n\nSome other great aspects:\n\n- Zero dependencies\n- Works in Node.js and all modern browsers\n- Tiny: 8kb minified + zipped\n- Immutable: methods (e.g. `.optional()`) return a new instance\n- Concise, chainable interface\n- Functional approach: [parse, don't validate](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/)\n- Works with plain JavaScript too! You don't need to use TypeScript.\n\n### Sponsors\n\nSponsorship at any level is appreciated and encouraged. For individual developers, consider the [Cup of Coffee tier](https://github.com/sponsors/colinhacks). If you built a paid product using Zod, consider one of the [podium tiers](https://github.com/sponsors/colinhacks).\n\n#### Gold\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://speakeasyapi.dev/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/91446104?s=200&v=4\" width=\"200px;\" alt=\"Speakeasy API\" />\n      </a>\n      <br />\n      <b>Speakeasy</b>\n      <br />\n      <a href=\"https://speakeasyapi.dev/\" target=\"_blank\">speakeasyapi.dev</a>\n      <br />\n      <p width=\"200px\">SDKs, Terraform, Docs.<br/>Your API made enterprise-ready</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://deletype.com/\" target=\"_blank\">\n        <img src=\"https://avatars0.githubusercontent.com/u/15068039?s=200&v=4\" width=\"200px;\" alt=\"Deletype logo\" />\n      </a>\n      <br />\n      <b>Deletype</b>\n      <br />\n      <a href=\"https://deletype.com\" target=\"_blank\">deletype.com</a>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://trigger.dev/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/95297378?s=200&v=4\" width=\"200px;\" alt=\"Trigger.dev logo\" />\n      </a>\n      <br />\n      <b>Trigger.dev</b>\n      <br />\n      <a href=\"https://trigger.dev\" target=\"_blank\">trigger.dev</a>\n      <br/>\n      <p>Effortless automation for developers</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://transloadit.com/?utm_source=@crabas0npm/aut-aliquam-magnam&utm_medium=referral&utm_campaign=sponsorship&utm_content=github\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/125754?s=200&v=4\" width=\"200px;\" alt=\"Transloadit logo\" />\n      </a>\n      <br />\n      <b>Transloadit</b>\n      <br />\n      <a href=\"https://transloadit.com/?utm_source=@crabas0npm/aut-aliquam-magnam&utm_medium=referral&utm_campaign=sponsorship&utm_content=github\" target=\"_blank\">transloadit.com</a>\n      <br/>\n      <p>Simple file processing for developers</p>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://infisical.com\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/107880645?s=200&v=4\" width=\"200px;\" alt=\"Infisical logo\" />\n      </a>\n      <br />\n      <b>Infisical</b>\n      <br />\n      <a href=\"https://infisical.com\" target=\"_blank\">infisical.com</a>\n      <br/>\n      <p>Open-source platform for secret<br/>management: sync secrets across your<br/>team/infrastructure and prevent secret leaks</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://whop.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/91036480?s=200&v=4\" width=\"200px;\" alt=\"Whop logo\" />\n      </a>\n      <br />\n      <b>Whop</b>\n      <br />\n      <a href=\"https://whop.com/\" target=\"_blank\">whop.com</a>\n      <br />\n      <p width=\"200px\">A marketplace for really cool internet products</p>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://cryptojobslist.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/36402888?s=200&v=4\" width=\"200px;\" alt=\"CryptoJobsList logo\" />\n      </a>\n      <br />\n      <b>CryptoJobsList</b>\n      <br />\n      <a href=\"https://cryptojobslist.com/\" target=\"_blank\">cryptojobslist.com</a>\n      <br />\n      <p width=\"200px\">The biggest list of crypto, blockchain and Web3 jobs</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://plain.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/70170949?s=200&v=4\" width=\"200px;\" alt=\"Plain logo\" />\n      </a>\n      <br />\n      <b>Plain.</b>\n      <br />\n      <a href=\"https://plain.com/\" target=\"_blank\">plain.com</a>\n      <br />\n      <p width=\"200px\">How developers support their users</p>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://inngest.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/78935958?s=200&v=4\" width=\"200px;\" alt=\"Inngest logo\" />\n      </a>\n      <br />\n      <b>Inngest</b>\n      <br />\n      <a href=\"https://inngest.com/\" target=\"_blank\">inngest.com</a>\n      <br />\n      <p width=\"200px\">Serverless queues + durable workflows for TypeScript</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://storyblok.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/13880908?s=200&v=4\" width=\"200px;\" alt=\"Storyblok CMS\" />\n      </a>\n      <br />\n      <b>Storyblok</b>\n      <br />\n      <a href=\"https://storyblok.com/\" target=\"_blank\">storyblok.com</a>\n      <br />\n      <p width=\"200px\">The only headless CMS with a visual editor</p>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://mux.link/@crabas0npm/aut-aliquam-magnam\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/16199997?s=200&v=4\" width=\"200px;\" alt=\"Mux logo\" />\n      </a>\n      <br />\n      <b>Mux</b>\n      <br />\n      <a href=\"https://mux.link/@crabas0npm/aut-aliquam-magnam\" target=\"_blank\">mux.com</a>\n      <br />\n      <p width=\"200px\">The internet's video infrastructure</p>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://scalar.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/301879?s=200&v=4\" width=\"200px;\" alt=\"Scalar.com logo\" />\n      </a>\n      <br />\n      <b>Scalar</b>\n      <br />\n      <a href=\"https://scalar.com/\" target=\"_blank\">scalar.com</a>\n      <br />\n      <p width=\"200px\">Document, discover & test APIs with Scalar</p>\n    </td>\n  </tr>\n</table>\n\n#### Silver\n\n<table>\n  <tr>\n    <td align=\"center\" colspan=\"2\">\n      <a href=\"https://www.numeric.io\" target=\"_blank\">\n        <img src=\"https://i.imgur.com/kTiLtZt.png\" width=\"250px;\" alt=\"Numeric logo\" />\n      </a>\n      <br />\n      <b>Numeric</b>\n      <br />\n      <a href=\"https://www.numeric.io\" target=\"_blank\">numeric.io</a>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://marcatopartners.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/84106192?s=200&v=4\" width=\"150px;\" alt=\"Marcato Partners\" />\n      </a>\n      <br />\n      <b>Marcato Partners</b>\n      <br />\n      <a href=\"https://marcatopartners.com/\" target=\"_blank\">marcatopartners.com</a>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://interval.com\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/67802063?s=200&v=4\" width=\"150px;\" alt=\"\" />\n      </a>\n      <br />\n      <b>Interval</b>\n      <br />\n      <a href=\"https://interval.com\" target=\"_blank\">interval.com</a>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://seasoned.cc\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/33913103?s=200&v=4\" width=\"150px;\" alt=\"\" />\n      </a>\n      <br />\n      <b>Seasoned Software</b>\n      <br />\n      <a href=\"https://seasoned.cc\" target=\"_blank\">seasoned.cc</a>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://www.bamboocreative.nz/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/41406870?v=4\" width=\"150px;\" alt=\"Bamboo Creative logo\" />\n      </a>\n      <br />\n      <b>Bamboo Creative</b>\n      <br />\n      <a href=\"https://www.bamboocreative.nz\" target=\"_blank\">bamboocreative.nz</a>\n    </td>\n  </tr>\n</table>\n\n#### Bronze\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://twitter.com/flybayer\" target=\"_blank\">\n        <img src=\"https://avatars2.githubusercontent.com/u/8813276?s=460&u=4ff8beb9a67b173015c4b426a92d89cab960af1b&v=4\" width=\"100px;\" alt=\"\"/>\n      </a>\n      <br />\n      <b>Brandon Bayer</b>\n      <br/>\n      <a href=\"https://twitter.com/flybayer\" target=\"_blank\">@flybayer</a>,\n      <span>creator of <a href=\"https://blitzjs.com\">Blitz.js</a></span>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://github.com/brabeji\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/2237954?v=4\" width=\"100px;\" alt=\"\"/>\n      </a>\n      <br />\n      <b>Jiří Brabec</b>\n      <br/>\n      <a href=\"https://github.com/brabeji\" target=\"_blank\">@brabeji</a>\n      <br />\n    </td>\n     <td align=\"center\">\n      <a href=\"https://twitter.com/alexdotjs\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/459267?v=4\" width=\"100px;\" alt=\"\" />\n      </a>\n      <br />\n      <b>Alex Johansson</b>\n      <br />\n      <a href=\"https://twitter.com/alexdotjs\" target=\"_blank\">@alexdotjs</a>\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://fungible.systems/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/80220121?s=200&v=4\" width=\"100px;\" alt=\"Fungible Systems logo\"/>\n      </a>\n      <br />\n      <b>Fungible Systems</b>\n      <br/>\n      <a href=\"https://fungible.systems/\" target=\"_blank\">fungible.systems</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://adaptable.io/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/60378268?s=200&v=4\" width=\"100px;\" alt=\"\"/>\n      </a>\n      <br />\n      <b>Adaptable</b>\n      <br/>\n      <a href=\"https://adaptable.io/\" target=\"_blank\">adaptable.io</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://www.avanawallet.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/105452197?s=200&v=4\" width=\"100px;\" alt=\"Avana Wallet logo\"/>\n      </a>\n      <br />\n      <b>Avana Wallet</b>\n      <br/>\n      <a href=\"https://www.avanawallet.com/\" target=\"_blank\">avanawallet.com</a><br/>\n      <span>Solana non-custodial wallet</span>\n      <br />\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://learnwithjason.dev\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/66575486?s=200&v=4\" width=\"100px;\" alt=\"Learn with Jason logo\"/>\n      </a>\n      <br />\n      <b>Jason Lengstorf</b>\n      <br/>\n      <a href=\"https://learnwithjason.dev/\" target=\"_blank\">learnwithjason.dev</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://ill.inc/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/89107581?s=200&v=4\" width=\"100px;\" alt=\"Global Illumination\"/>\n      </a>\n      <br />\n      <b>Global Illumination, Inc.</b>\n      <br/>\n      <a href=\"https://ill.inc/\" target=\"_blank\">ill.inc</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=@crabas0npm/aut-aliquam-magnamsponsoring\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/48984031?s=200&v=4\" width=\"100px;\" alt=\"MasterBorn logo\"/>\n      </a>\n      <br />\n      <b>MasterBorn</b>\n      <br/>\n      <a href=\"https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=@crabas0npm/aut-aliquam-magnamsponsoring\" target=\"_blank\">masterborn.com</a>\n      <br />\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/kronodeus\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/18314366?v=4\" width=\"100px;\" alt=\"Ryan Palmer\"/>\n      </a>\n      <br />\n      <b>Ryan Palmer</b>\n      <br/>\n      <a href=\"https://github.com/kronodeus\" target=\"_blank\">@kronodeus</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://github.com/overthemike\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/223509?v=4\" width=\"100px;\" alt=\"Michael Sweeney\"/>\n      </a>\n      <br />\n      <b>Michael Sweeney</b>\n      <br/>\n      <a href=\"https://github.com/overthemike\" target=\"_blank\">@overthemike</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://usenextbase.com/\" target=\"_blank\">\n        <img src=\"https://pbs.twimg.com/profile_images/1692236063409070080/28yXFtop_400x400.jpg\" width=\"100px;\" alt=\"Nextbase logo\"/>\n      </a>\n      <br />\n      <b>Nextbase</b>\n      <br/>\n      <a href=\"https://usenextbase.com/\" target=\"_blank\">usenextbase.com</a>\n      <br />\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://remotion.dev\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/85344006\" width=\"100px;\" alt=\"Remotion logo\"/>\n      </a>\n      <br />\n      <b>Remotion</b>\n      <br/>\n      <a href=\"https://remotion.dev\" target=\"_blank\">remotion.dev</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://github.com/ConnorSinnott\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/12754711?v=4\" width=\"100px;\" alt=\"Connor Sinnott profile\"/>\n      </a>\n      <br />\n      <b>Connor Sinnott</b>\n      <br/>\n      <a href=\"https://github.com/ConnorSinnott\" target=\"_blank\">@ConnorSinnott</a>\n      <br />\n    </td>\n    <td align=\"center\">\n      <a href=\"https://aerabi.com/\" target=\"_blank\">\n        <img src=\"https://avatars.githubusercontent.com/u/44623032?v=4\" width=\"100px;\" alt=\"aerabi\"/>\n      </a>\n      <br />\n      <b>Mohammad-Ali A'râbi</b>\n      <br/>\n      <a href=\"https://aerabi.com/\" target=\"_blank\">aerabi.com</a>\n      <br />\n    </td>\n  </tr>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://supatool.io/\" target=\"_blank\">\n        <img src=\"https://github.com/crabas0npm/aut-aliquam-magnam/assets/3084745/d0ec96c9-bf79-494f-9caa-9233da251f55\" width=\"100px;\" alt=\"Supatool logo\"/>\n      </a>\n      <br />\n      <b>Supatool</b>\n      <br/>\n      <a href=\"https://supatool.io/\" target=\"_blank\">supatool.io</a>\n      <br />\n    </td>\n  </tr>\n</table>\n\n### Ecosystem\n\nThere are a growing number of tools that are built atop or support Zod natively! If you've built a tool or library on top of Zod, tell me about it [on Twitter](https://twitter.com/colinhacks) or [start a Discussion](https://github.com/crabas0npm/aut-aliquam-magnam/discussions). I'll add it below and tweet it out.\n\n#### Resources\n\n- [Total TypeScript Zod Tutorial](https://www.totaltypescript.com/tutorials/@crabas0npm/aut-aliquam-magnam) by [@mattpocockuk](https://twitter.com/mattpocockuk)\n- [Fixing TypeScript's Blindspot: Runtime Typechecking](https://www.youtube.com/watch?v=rY_XqfSHock) by [@jherr](https://twitter.com/jherr)\n\n#### API libraries\n\n- [`tRPC`](https://github.com/trpc/trpc): Build end-to-end typesafe APIs without GraphQL.\n- [`@anatine/@crabas0npm/aut-aliquam-magnam-nestjs`](https://github.com/anatine/@crabas0npm/aut-aliquam-magnam-plugins/tree/main/packages/@crabas0npm/aut-aliquam-magnam-nestjs): Helper methods for using Zod in a NestJS project.\n- [`@crabas0npm/aut-aliquam-magnam-endpoints`](https://github.com/flock-community/@crabas0npm/aut-aliquam-magnam-endpoints): Contract-first strictly typed endpoints with Zod. OpenAPI compatible.\n- [`zhttp`](https://github.com/evertdespiegeleer/zhttp): An OpenAPI compatible, strictly typed http library with Zod input and response validation.\n- [`domain-functions`](https://github.com/SeasonedSoftware/domain-functions/): Decouple your business logic from your framework using composable functions. With first-class type inference from end to end powered by Zod schemas.\n- [`@@crabas0npm/aut-aliquam-magnamios/core`](https://github.com/ecyrbe/@crabas0npm/aut-aliquam-magnamios): A typescript API client with runtime and compile time validation backed by axios and @crabas0npm/aut-aliquam-magnam.\n- [`express-@crabas0npm/aut-aliquam-magnam-api`](https://github.com/RobinTail/express-@crabas0npm/aut-aliquam-magnam-api): Build Express-based APIs with I/O schema validation and custom middlewares.\n- [`tapiduck`](https://github.com/sumukhbarve/monoduck/blob/main/src/tapiduck/README.md): End-to-end typesafe JSON APIs with Zod and Express; a bit like tRPC, but simpler.\n- [`koa-@crabas0npm/aut-aliquam-magnam-router`](https://github.com/JakeFenley/koa-@crabas0npm/aut-aliquam-magnam-router): Create typesafe routes in Koa with I/O validation using Zod.\n\n#### Form integrations\n\n- [`react-hook-form`](https://github.com/react-hook-form/resolvers#@crabas0npm/aut-aliquam-magnam): A first-party Zod resolver for React Hook Form.\n- [`@crabas0npm/aut-aliquam-magnam-validation-error`](https://github.com/causaly/@crabas0npm/aut-aliquam-magnam-validation-error): Generate user-friendly error messages from `ZodError`s.\n- [`@crabas0npm/aut-aliquam-magnam-formik-adapter`](https://github.com/robertLichtnow/@crabas0npm/aut-aliquam-magnam-formik-adapter): A community-maintained Formik adapter for Zod.\n- [`react-zorm`](https://github.com/esamattis/react-zorm): Standalone `<form>` generation and validation for React using Zod.\n- [`@crabas0npm/aut-aliquam-magnamix`](https://github.com/rileytomasek/@crabas0npm/aut-aliquam-magnamix): Zod utilities for FormData and URLSearchParams in Remix loaders and actions.\n- [`conform`](https://conform.guide/api/@crabas0npm/aut-aliquam-magnam/parseWithZod): A typesafe form validation library for progressive enhancement of HTML forms. Works with Remix and Next.js.\n- [`remix-params-helper`](https://github.com/kiliman/remix-params-helper): Simplify integration of Zod with standard URLSearchParams and FormData for Remix apps.\n- [`formik-validator-@crabas0npm/aut-aliquam-magnam`](https://github.com/glazy/formik-validator-@crabas0npm/aut-aliquam-magnam): Formik-compliant validator library that simplifies using Zod with Formik.\n- [`@crabas0npm/aut-aliquam-magnam-i18n-map`](https://github.com/aiji42/@crabas0npm/aut-aliquam-magnam-i18n): Useful for translating Zod error messages.\n- [`@modular-forms/solid`](https://github.com/fabian-hiller/modular-forms): Modular form library for SolidJS that supports Zod for validation.\n- [`houseform`](https://github.com/crutchcorn/houseform/): A React form library that uses Zod for validation.\n- [`sveltekit-superforms`](https://github.com/ciscoheat/sveltekit-superforms): Supercharged form library for SvelteKit with Zod validation.\n- [`mobx-@crabas0npm/aut-aliquam-magnam-form`](https://github.com/MonoidDev/mobx-@crabas0npm/aut-aliquam-magnam-form): Data-first form builder based on MobX & Zod.\n- [`@vee-validate/@crabas0npm/aut-aliquam-magnam`](https://github.com/logaretm/vee-validate/tree/main/packages/@crabas0npm/aut-aliquam-magnam): Form library for Vue.js with Zod schema validation.\n\n#### Zod to X\n\n- [`@crabas0npm/aut-aliquam-magnam-to-ts`](https://github.com/sachinraja/@crabas0npm/aut-aliquam-magnam-to-ts): Generate TypeScript definitions from Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-to-json-schema`](https://github.com/StefanTerdell/@crabas0npm/aut-aliquam-magnam-to-json-schema): Convert your Zod schemas into [JSON Schemas](https://json-schema.org/).\n- [`@anatine/@crabas0npm/aut-aliquam-magnam-openapi`](https://github.com/anatine/@crabas0npm/aut-aliquam-magnam-plugins/tree/main/packages/@crabas0npm/aut-aliquam-magnam-openapi): Converts a Zod schema to an OpenAPI v3.x `SchemaObject`.\n- [`@crabas0npm/aut-aliquam-magnam-fast-check`](https://github.com/DavidTimms/@crabas0npm/aut-aliquam-magnam-fast-check): Generate `fast-check` arbitraries from Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-dto`](https://github.com/kbkk/abitia/tree/master/packages/@crabas0npm/aut-aliquam-magnam-dto): Generate Nest.js DTOs from a Zod schema.\n- [`fastify-type-provider-@crabas0npm/aut-aliquam-magnam`](https://github.com/turkerdev/fastify-type-provider-@crabas0npm/aut-aliquam-magnam): Create Fastify type providers from Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-to-openapi`](https://github.com/asteasolutions/@crabas0npm/aut-aliquam-magnam-to-openapi): Generate full OpenAPI (Swagger) docs from Zod, including schemas, endpoints & parameters.\n- [`nestjs-graphql-@crabas0npm/aut-aliquam-magnam`](https://github.com/incetarik/nestjs-graphql-@crabas0npm/aut-aliquam-magnam): Generates NestJS GraphQL model classes from Zod schemas. Provides GraphQL method decorators working with Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-openapi`](https://github.com/samchungy/@crabas0npm/aut-aliquam-magnam-openapi): Create full OpenAPI v3.x documentation from Zod schemas.\n- [`fastify-@crabas0npm/aut-aliquam-magnam-openapi`](https://github.com/samchungy/fastify-@crabas0npm/aut-aliquam-magnam-openapi): Fastify type provider, validation, serialization and @fastify/swagger support for Zod schemas.\n- [`typeschema`](https://typeschema.com/): Universal adapter for schema validation.\n\n#### X to Zod\n\n- [`ts-to-@crabas0npm/aut-aliquam-magnam`](https://github.com/fabien0102/ts-to-@crabas0npm/aut-aliquam-magnam): Convert TypeScript definitions into Zod schemas.\n- [`@runtyping/@crabas0npm/aut-aliquam-magnam`](https://github.com/johngeorgewright/runtyping/tree/master/packages/@crabas0npm/aut-aliquam-magnam): Generate Zod from static types & JSON schema.\n- [`json-schema-to-@crabas0npm/aut-aliquam-magnam`](https://github.com/StefanTerdell/json-schema-to-@crabas0npm/aut-aliquam-magnam): Convert your [JSON Schemas](https://json-schema.org/) into Zod schemas. [Live demo](https://StefanTerdell.github.io/json-schema-to-@crabas0npm/aut-aliquam-magnam-react/).\n- [`json-to-@crabas0npm/aut-aliquam-magnam`](https://github.com/rsinohara/json-to-@crabas0npm/aut-aliquam-magnam): Convert JSON objects into Zod schemas. [Live demo](https://rsinohara.github.io/json-to-@crabas0npm/aut-aliquam-magnam-react/).\n- [`graphql-codegen-typescript-validation-schema`](https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema): GraphQL Code Generator plugin to generate form validation schema from your GraphQL schema.\n- [`@crabas0npm/aut-aliquam-magnam-prisma`](https://github.com/CarterGrimmeisen/@crabas0npm/aut-aliquam-magnam-prisma): Generate Zod schemas from your Prisma schema.\n- [`Supervillain`](https://github.com/Southclaws/supervillain): Generate Zod schemas from your Go structs.\n- [`prisma-@crabas0npm/aut-aliquam-magnam-generator`](https://github.com/omar-dulaimi/prisma-@crabas0npm/aut-aliquam-magnam-generator): Emit Zod schemas from your Prisma schema.\n- [`prisma-trpc-generator`](https://github.com/omar-dulaimi/prisma-trpc-generator): Emit fully implemented tRPC routers and their validation schemas using Zod.\n- [`@crabas0npm/aut-aliquam-magnam-prisma-types`](https://github.com/chrishoermann/@crabas0npm/aut-aliquam-magnam-prisma-types) Create Zod types from your Prisma models.\n- [`quicktype`](https://app.quicktype.io/): Convert JSON objects and JSON schemas into Zod schemas.\n- [`@sanity-typed/@crabas0npm/aut-aliquam-magnam`](https://github.com/saiichihashimoto/sanity-typed/tree/main/packages/@crabas0npm/aut-aliquam-magnam): Generate Zod Schemas from [Sanity Schemas](https://www.sanity.io/docs/schema-types).\n- [`java-to-@crabas0npm/aut-aliquam-magnam`](https://github.com/ivangreene/java-to-@crabas0npm/aut-aliquam-magnam): Convert POJOs to Zod schemas\n- [`Orval`](https://github.com/anymaniax/orval): Generate Zod schemas from OpenAPI schemas\n\n#### Mocking\n\n- [`@anatine/@crabas0npm/aut-aliquam-magnam-mock`](https://github.com/anatine/@crabas0npm/aut-aliquam-magnam-plugins/tree/main/packages/@crabas0npm/aut-aliquam-magnam-mock): Generate mock data from a Zod schema. Powered by [faker.js](https://github.com/faker-js/faker).\n- [`@crabas0npm/aut-aliquam-magnam-mocking`](https://github.com/dipasqualew/@crabas0npm/aut-aliquam-magnam-mocking): Generate mock data from your Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-fixture`](https://github.com/timdeschryver/@crabas0npm/aut-aliquam-magnam-fixture): Use your @crabas0npm/aut-aliquam-magnam schemas to automate the generation of non-relevant test fixtures in a deterministic way.\n- [`zocker`](https://zocker.sigrist.dev): Generate plausible mock-data from your schemas.\n- [`@crabas0npm/aut-aliquam-magnamock`](https://github.com/ItMaga/@crabas0npm/aut-aliquam-magnamock) Generate mock data based on Zod schemas.\n\n#### Powered by Zod\n\n- [`freerstore`](https://github.com/JacobWeisenburger/freerstore): Firestore cost optimizer.\n- [`slonik`](https://github.com/gajus/slonik/tree/gajus/add-@crabas0npm/aut-aliquam-magnam-validation-backwards-compatible#runtime-validation-and-static-type-inference): Node.js Postgres client with strong Zod integration.\n- [`soly`](https://github.com/mdbetancourt/soly): Create CLI applications with @crabas0npm/aut-aliquam-magnam.\n- [`pastel`](https://github.com/vadimdemedes/pastel): Create CLI applications with react, @crabas0npm/aut-aliquam-magnam, and ink.\n- [`@crabas0npm/aut-aliquam-magnam-xlsx`](https://github.com/sidwebworks/@crabas0npm/aut-aliquam-magnam-xlsx): A xlsx based resource validator using Zod schemas.\n- [`znv`](https://github.com/lostfictions/znv): Type-safe environment parsing and validation for Node.js with Zod schemas.\n- [`@crabas0npm/aut-aliquam-magnam-config`](https://github.com/alexmarqs/@crabas0npm/aut-aliquam-magnam-config): Load configurations across multiple sources with flexible adapters, ensuring type safety with Zod.\n\n#### Utilities for Zod\n\n- [`@crabas0npm/aut-aliquam-magnam_utilz`](https://github.com/JacobWeisenburger/@crabas0npm/aut-aliquam-magnam_utilz): Framework agnostic utilities for Zod.\n- [`@crabas0npm/aut-aliquam-magnam-sandbox`](https://github.com/nereumelo/@crabas0npm/aut-aliquam-magnam-sandbox): Controlled environment for testing @crabas0npm/aut-aliquam-magnam schemas. [Live demo](https://@crabas0npm/aut-aliquam-magnam-sandbox.vercel.app/).\n- [`@crabas0npm/aut-aliquam-magnam-dev`](https://github.com/schalkventer/@crabas0npm/aut-aliquam-magnam-dev): Conditionally disables Zod runtime parsing in production.\n- [`@crabas0npm/aut-aliquam-magnam-accelerator`](https://github.com/duplojs/duplojs-@crabas0npm/aut-aliquam-magnam-accelerator): Accelerates Zod's throughput up to ~100x.\n\n## Installation\n\n### Requirements\n\n- TypeScript 4.5+!\n- You must enable `strict` mode in your `tsconfig.json`. This is a best practice for all TypeScript projects.\n\n  ```ts\n  // tsconfig.json\n  {\n    // ...\n    \"compilerOptions\": {\n      // ...\n      \"strict\": true\n    }\n  }\n  ```\n\n### From `npm` (Node/Bun)\n\n```sh\nnpm install @crabas0npm/aut-aliquam-magnam       # npm\nyarn add @crabas0npm/aut-aliquam-magnam          # yarn\nbun add @crabas0npm/aut-aliquam-magnam           # bun\npnpm add @crabas0npm/aut-aliquam-magnam          # pnpm\n```\n\nZod also publishes a canary version on every commit. To install the canary:\n\n```sh\nnpm install @crabas0npm/aut-aliquam-magnam@canary       # npm\nyarn add @crabas0npm/aut-aliquam-magnam@canary          # yarn\nbun add @crabas0npm/aut-aliquam-magnam@canary           # bun\npnpm add @crabas0npm/aut-aliquam-magnam@canary          # pnpm\n```\n\n### From `deno.land/x` (Deno)\n\nUnlike Node, Deno relies on direct URL imports instead of a package manager like NPM. Zod is available on [deno.land/x](https://deno.land/x). The latest version can be imported like so:\n\n```ts\nimport { z } from \"https://deno.land/x/@crabas0npm/aut-aliquam-magnam/mod.ts\";\n```\n\nYou can also specify a particular version:\n\n```ts\nimport { z } from \"https://deno.land/x/@crabas0npm/aut-aliquam-magnam@v3.16.1/mod.ts\";\n```\n\n> The rest of this README assumes you are using npm and importing directly from the `\"@crabas0npm/aut-aliquam-magnam\"` package.\n\n## Basic usage\n\nCreating a simple string schema\n\n```ts\nimport { z } from \"@crabas0npm/aut-aliquam-magnam\";\n\n// creating a schema for strings\nconst mySchema = z.string();\n\n// parsing\nmySchema.parse(\"tuna\"); // => \"tuna\"\nmySchema.parse(12); // => throws ZodError\n\n// \"safe\" parsing (doesn't throw error if validation fails)\nmySchema.safeParse(\"tuna\"); // => { success: true; data: \"tuna\" }\nmySchema.safeParse(12); // => { success: false; error: ZodError }\n```\n\nCreating an object schema\n\n```ts\nimport { z } from \"@crabas0npm/aut-aliquam-magnam\";\n\nconst User = z.object({\n  username: z.string(),\n});\n\nUser.parse({ username: \"Ludwig\" });\n\n// extract the inferred type\ntype User = z.infer<typeof User>;\n// { username: string }\n```\n\n## Primitives\n\n```ts\nimport { z } from \"@crabas0npm/aut-aliquam-magnam\";\n\n// primitive values\nz.string();\nz.number();\nz.bigint();\nz.boolean();\nz.date();\nz.symbol();\n\n// empty types\nz.undefined();\nz.null();\nz.void(); // accepts undefined\n\n// catch-all types\n// allows any value\nz.any();\nz.unknown();\n\n// never type\n// allows no values\nz.never();\n```\n\n## Coercion for primitives\n\nZod now provides a more convenient way to coerce primitive values.\n\n```ts\nconst schema = z.coerce.string();\nschema.parse(\"tuna\"); // => \"tuna\"\nschema.parse(12); // => \"12\"\n```\n\nDuring the parsing step, the input is passed through the `String()` function, which is a JavaScript built-in for coercing data into strings.\n\n```ts\nschema.parse(12); // => \"12\"\nschema.parse(true); // => \"true\"\nschema.parse(undefined); // => \"undefined\"\nschema.parse(null); // => \"null\"\n```\n\nThe returned schema is a normal `ZodString` instance so you can use all string methods.\n\n```ts\nz.coerce.string().email().min(5);\n```\n\n**How coercion works**\n\nAll primitive types support coercion. Zod coerces all inputs using the built-in constructors: `String(input)`, `Number(input)`, `new Date(input)`, etc.\n\n```ts\nz.coerce.string(); // String(input)\nz.coerce.number(); // Number(input)\nz.coerce.boolean(); // Boolean(input)\nz.coerce.bigint(); // BigInt(input)\nz.coerce.date(); // new Date(input)\n```\n\n**Note** — Boolean coercion with `z.coerce.boolean()` may not work how you expect. Any [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) value is coerced to `true`, and any [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) value is coerced to `false`.\n\n```ts\nconst schema = z.coerce.boolean(); // Boolean(input)\n\nschema.parse(\"tuna\"); // => true\nschema.parse(\"true\"); // => true\nschema.parse(\"false\"); // => true\nschema.parse(1); // => true\nschema.parse([]); // => true\n\nschema.parse(0); // => false\nschema.parse(\"\"); // => false\nschema.parse(undefined); // => false\nschema.parse(null); // => false\n```\n\nFor more control over coercion logic, consider using [`z.preprocess`](#preprocess) or [`z.pipe()`](#pipe).\n\n## Literals\n\nLiteral schemas represent a [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types), like `\"hello world\"` or `5`.\n\n```ts\nconst tuna = z.literal(\"tuna\");\nconst twelve = z.literal(12);\nconst twobig = z.literal(2n); // bigint literal\nconst tru = z.literal(true);\n\nconst terrificSymbol = Symbol(\"terrific\");\nconst terrific = z.literal(terrificSymbol);\n\n// retrieve literal value\ntuna.value; // \"tuna\"\n```\n\n> Currently there is no support for Date literals in Zod. If you have a use case for this feature, please file an issue.\n\n## Strings\n\nZod includes a handful of string-specific validations.\n\n```ts\n// validations\nz.string().max(5);\nz.string().min(5);\nz.string().length(5);\nz.string().email();\nz.string().url();\nz.string().emoji();\nz.string().uuid();\nz.string().nanoid();\nz.string().cuid();\nz.string().cuid2();\nz.string().ulid();\nz.string().regex(regex);\nz.string().includes(string);\nz.string().startsWith(string);\nz.string().endsWith(string);\nz.string().datetime(); // ISO 8601; by default only `Z` timezone allowed\nz.string().ip(); // defaults to allow both IPv4 and IPv6\n\n// transforms\nz.string().trim(); // trim whitespace\nz.string().toLowerCase(); // toLowerCase\nz.string().toUpperCase(); // toUpperCase\n\n// added in Zod 3.23\nz.string().date(); // ISO date format (YYYY-MM-DD)\nz.string().time(); // ISO time format (HH:mm:ss[.SSSSSS])\nz.string().duration(); // ISO 8601 duration\nz.string().base64();\n```\n\n> Check out [validator.js](https://github.com/validatorjs/validator.js) for a bunch of other useful string validation functions that can be used in conjunction with [Refinements](#refine).\n\nYou can customize some common error messages when creating a string schema.\n\n```ts\nconst name = z.string({\n  required_error: \"Name is required\",\n  invalid_type_error: \"Name must be a string\",\n});\n```\n\nWhen using validation methods, you can pass in an additional argument to provide a custom error message.\n\n```ts\nz.string().min(5, { message: \"Must be 5 or more characters long\" });\nz.string().max(5, { message: \"Must be 5 or fewer characters long\" });\nz.string().length(5, { message: \"Must be exactly 5 characters long\" });\nz.string().email({ message: \"Invalid email address\" });\nz.string().url({ message: \"Invalid url\" });\nz.string().emoji({ message: \"Contains non-emoji characters\" });\nz.string().uuid({ message: \"Invalid UUID\" });\nz.string().includes(\"tuna\", { message: \"Must include tuna\" });\nz.string().startsWith(\"https://\", { message: \"Must provide secure URL\" });\nz.string().endsWith(\".com\", { message: \"Only .com domains allowed\" });\nz.string().datetime({ message: \"Invalid datetime string! Must be UTC.\" });\nz.string().date({ message: \"Invalid date string!\" });\nz.string().time({ message: \"Invalid time string!\" });\nz.string().ip({ message: \"Invalid IP address\" });\n```\n\n### Datetimes\n\nAs you may have noticed, Zod string includes a few date/time related validations. These validations are regular expression based, so they are not as strict as a full date/time library. However, they are very convenient for validating user input.\n\nThe `z.string().datetime()` method enforces ISO 8601; default is no timezone offsets and arbitrary sub-second decimal precision.\n\n```ts\nconst datetime = z.string().datetime();\n\ndatetime.parse(\"2020-01-01T00:00:00Z\"); // pass\ndatetime.parse(\"2020-01-01T00:00:00.123Z\"); // pass\ndatetime.parse(\"2020-01-01T00:00:00.123456Z\"); // pass (arbitrary precision)\ndatetime.parse(\"2020-01-01T00:00:00+02:00\"); // fail (no offsets allowed)\n```\n\nTimezone offsets can be allowed by setting the `offset` option to `true`.\n\n```ts\nconst datetime = z.string().datetime({ offset: true });\n\ndatetime.parse(\"2020-01-01T00:00:00+02:00\"); // pass\ndatetime.parse(\"2020-01-01T00:00:00.123+02:00\"); // pass (millis optional)\ndatetime.parse(\"2020-01-01T00:00:00.123+0200\"); // pass (millis optional)\ndatetime.parse(\"2020-01-01T00:00:00.123+02\"); // pass (only offset hours)\ndatetime.parse(\"2020-01-01T00:00:00Z\"); // pass (Z still supported)\n```\n\nYou can additionally constrain the allowable `precision`. By default, arbitrary sub-second precision is supported (but optional).\n\n```ts\nconst datetime = z.string().datetime({ precision: 3 });\n\ndatetime.parse(\"2020-01-01T00:00:00.123Z\"); // pass\ndatetime.parse(\"2020-01-01T00:00:00Z\"); // fail\ndatetime.parse(\"2020-01-01T00:00:00.123456Z\"); // fail\n```\n\n### Dates\n\n> Added in Zod 3.23\n\nThe `z.string().date()` method validates strings in the format `YYYY-MM-DD`.\n\n```ts\nconst date = z.string().date();\n\ndate.parse(\"2020-01-01\"); // pass\ndate.parse(\"2020-1-1\"); // fail\ndate.parse(\"2020-01-32\"); // fail\n```\n\n### Times\n\n> Added in Zod 3.23\n\nThe `z.string().time()` method validates strings in the format `HH:MM:SS[.s+]`. The second can include arbitrary decimal precision. It does not allow timezone offsets of any kind.\n\n```ts\nconst time = z.string().time();\n\ntime.parse(\"00:00:00\"); // pass\ntime.parse(\"09:52:31\"); // pass\ntime.parse(\"23:59:59.9999999\"); // pass (arbitrary precision)\n\ntime.parse(\"00:00:00.123Z\"); // fail (no `Z` allowed)\ntime.parse(\"00:00:00.123+02:00\"); // fail (no offsets allowed)\n```\n\nYou can set the `precision` option to constrain the allowable decimal precision.\n\n```ts\nconst time = z.string().time({ precision: 3 });\n\ntime.parse(\"00:00:00.123\"); // pass\ntime.parse(\"00:00:00.123456\"); // fail\ntime.parse(\"00:00:00\"); // fail\n```\n\n### IP addresses\n\nThe `z.string().ip()` method by default validate IPv4 and IPv6.\n\n```ts\nconst ip = z.string().ip();\n\nip.parse(\"192.168.1.1\"); // pass\nip.parse(\"84d5:51a0:9114:1855:4cfa:f2d7:1f12:7003\"); // pass\nip.parse(\"84d5:51a0:9114:1855:4cfa:f2d7:1f12:192.168.1.1\"); // pass\n\nip.parse(\"256.1.1.1\"); // fail\nip.parse(\"84d5:51a0:9114:gggg:4cfa:f2d7:1f12:7003\"); // fail\n```\n\nYou can additionally set the IP `version`.\n\n```ts\nconst ipv4 = z.string().ip({ version: \"v4\" });\nipv4.parse(\"84d5:51a0:9114:1855:4cfa:f2d7:1f12:7003\"); // fail\n\nconst ipv6 = z.string().ip({ version: \"v6\" });\nipv6.parse(\"192.168.1.1\"); // fail\n```\n\n## Numbers\n\nYou can customize certain error messages when creating a number schema.\n\n```ts\nconst age = z.number({\n  required_error: \"Age is required\",\n  invalid_type_error: \"Age must be a number\",\n});\n```\n\nZod includes a handful of number-specific validations.\n\n```ts\nz.number().gt(5);\nz.number().gte(5); // alias .min(5)\nz.number().lt(5);\nz.number().lte(5); // alias .max(5)\n\nz.number().int(); // value must be an integer\n\nz.number().positive(); //     > 0\nz.number().nonnegative(); //  >= 0\nz.number().negative(); //     < 0\nz.number().nonpositive(); //  <= 0\n\nz.number().multipleOf(5); // Evenly divisible by 5. Alias .step(5)\n\nz.number().finite(); // value must be finite, not Infinity or -Infinity\nz.number().safe(); // value must be between Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER\n```\n\nOptionally, you can pass in a second argument to provide a custom error message.\n\n```ts\nz.number().lte(5, { message: \"this👏is👏too👏big\" });\n```\n\n## BigInts\n\nZod includes a handful of bigint-specific validations.\n\n```ts\nz.bigint().gt(5n);\nz.bigint().gte(5n); // alias `.min(5n)`\nz.bigint().lt(5n);\nz.bigint().lte(5n); // alias `.max(5n)`\n\nz.bigint().positive(); // > 0n\nz.bigint().nonnegative(); // >= 0n\nz.bigint().negative(); // < 0n\nz.bigint().nonpositive(); // <= 0n\n\nz.bigint().multipleOf(5n); // Evenly divisible by 5n.\n```\n\n## NaNs\n\nYou can customize certain error messages when creating a nan schema.\n\n```ts\nconst isNaN = z.nan({\n  required_error: \"isNaN is required\",\n  invalid_type_error: \"isNaN must be 'not a number'\",\n});\n```\n\n## Booleans\n\nYou can customize certain error messages when creating a boolean schema.\n\n```ts\nconst isActive = z.boolean({\n  required_error: \"isActive is required\",\n  invalid_type_error: \"isActive must be a boolean\",\n});\n```\n\n## Dates\n\nUse z.date() to validate `Date` instances.\n\n```ts\nz.date().safeParse(new Date()); // success: true\nz.date().safeParse(\"2022-01-12T00:00:00.000Z\"); // success: false\n```\n\nYou can customize certain error messages when creating a date schema.\n\n```ts\nconst myDateSchema = z.date({\n  required_error: \"Please select a date and time\",\n  invalid_type_error: \"That's not a date!\",\n});\n```\n\nZod provides a handful of date-specific validations.\n\n```ts\nz.date().min(new Date(\"1900-01-01\"), { message: \"Too old\" });\nz.date().max(new Date(), { message: \"Too young!\" });\n```\n\n**Coercion to Date**\n\nSince [@crabas0npm/aut-aliquam-magnam 3.20](https://github.com/crabas0npm/aut-aliquam-magnam/releases/tag/v3.20), use [`z.coerce.date()`](#coercion-for-primitives) to pass the input through `new Date(input)`.\n\n```ts\nconst dateSchema = z.coerce.date();\ntype DateSchema = z.infer<typeof dateSchema>;\n// type DateSchema = Date\n\n/* valid dates */\nconsole.log(dateSchema.safeParse(\"2023-01-10T00:00:00.000Z\").success); // true\nconsole.log(dateSchema.safeParse(\"2023-01-10\").success); // true\nconsole.log(dateSchema.safeParse(\"1/10/23\").success); // true\nconsole.log(dateSchema.safeParse(new Date(\"1/10/23\")).success); // true\n\n/* invalid dates */\nconsole.log(dateSchema.safeParse(\"2023-13-10\").success); // false\nconsole.log(dateSchema.safeParse(\"0000-00-00\").success); // false\n```\n\nFor older @crabas0npm/aut-aliquam-magnam versions, use [`z.preprocess`](#preprocess) like [described in this thread](https://github.com/crabas0npm/aut-aliquam-magnam/discussions/879#discussioncomment-2036276).\n\n## Zod enums\n\n```ts\nconst FishEnum = z.enum([\"Salmon\", \"Tuna\", \"Trout\"]);\ntype FishEnum = z.infer<typeof FishEnum>;\n// 'Salmon' | 'Tuna' | 'Trout'\n```\n\n`z.enum` is a Zod-native way to declare a schema with a fixed set of allowable _string_ values. Pass the array of values directly into `z.enum()`. Alternatively, use `as const` to define your enum values as a tuple of strings. See the [const assertion docs](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) for details.\n\n```ts\nconst VALUES = [\"Salmon\", \"Tuna\", \"Trout\"] as const;\nconst FishEnum = z.enum(VALUES);\n```\n\nThis is not allowed, since Zod isn't able to infer the exact values of each element.\n\n```ts\nconst fish = [\"Salmon\", \"Tuna\", \"Trout\"];\nconst FishEnum = z.enum(fish);\n```\n\n**`.enum`**\n\nTo get autocompletion with a Zod enum, use the `.enum` property of your schema:\n\n```ts\nFishEnum.enum.Salmon; // => autocompletes\n\nFishEnum.enum;\n/*\n=> {\n  Salmon: \"Salmon\",\n  Tuna: \"Tuna\",\n  Trout: \"Trout\",\n}\n*/\n```\n\nYou can also retrieve the list of options as a tuple with the `.options` property:\n\n```ts\nFishEnum.options; // [\"Salmon\", \"Tuna\", \"Trout\"];\n```\n\n**`.exclude/.extract()`**\n\nYou can create subsets of a Zod enum with the `.exclude` and `.extract` methods.\n\n```ts\nconst FishEnum = z.enum([\"Salmon\", \"Tuna\", \"Trout\"]);\nconst SalmonAndTrout = FishEnum.extract([\"Salmon\", \"Trout\"]);\nconst TunaOnly = FishEnum.exclude([\"Salmon\", \"Trout\"]);\n```\n\n## Native enums\n\nZod enums are the recommended approach to defining and validating enums. But if you need to validate against an enum from a third-party library (or you don't want to rewrite your existing enums) you can use `z.nativeEnum()`.\n\n**Numeric enums**\n\n```ts\nenum Fruits {\n  Apple,\n  Banana,\n}\n\nconst FruitEnum = z.nativeEnum(Fruits);\ntype FruitEnum = z.infer<typeof FruitEnum>; // Fruits\n\nFruitEnum.parse(Fruits.Apple); // passes\nFruitEnum.parse(Fruits.Banana); // passes\nFruitEnum.parse(0); // passes\nFruitEnum.parse(1); // passes\nFruitEnum.parse(3); // fails\n```\n\n**String enums**\n\n```ts\nenum Fruits {\n  Apple = \"apple\",\n  Banana = \"banana\",\n  Cantaloupe, // you can mix numerical and string enums\n}\n\nconst FruitEnum = z.nativeEnum(Fruits);\ntype FruitEnum = z.infer<typeof FruitEnum>; // Fruits\n\nFruitEnum.parse(Fruits.Apple); // passes\nFruitEnum.parse(Fruits.Cantaloupe); // passes\nFruitEnum.parse(\"apple\"); // passes\nFruitEnum.parse(\"banana\"); // passes\nFruitEnum.parse(0); // passes\nFruitEnum.parse(\"Cantaloupe\"); // fails\n```\n\n**Const enums**\n\nThe `.nativeEnum()` function works for `as const` objects as well. ⚠️ `as const` requires TypeScript 3.4+!\n\n```ts\nconst Fruits = {\n  Apple: \"apple\",\n  Banana: \"banana\",\n  Cantaloupe: 3,\n} as const;\n\nconst FruitEnum = z.nativeEnum(Fruits);\ntype FruitEnum = z.infer<typeof FruitEnum>; // \"apple\" | \"banana\" | 3\n\nFruitEnum.parse(\"apple\"); // passes\nFruitEnum.parse(\"banana\"); // passes\nFruitEnum.parse(3); // passes\nFruitEnum.parse(\"Cantaloupe\"); // fails\n```\n\nYou can access the underlying object with the `.enum` property:\n\n```ts\nFruitEnum.enum.Apple; // \"apple\"\n```\n\n## Optionals\n\nYou can make any schema optional with `z.optional()`. This wraps the schema in a `ZodOptional` instance and returns the result.\n\n```ts\nconst schema = z.optional(z.string());\n\nschema.parse(undefined); // => returns undefined\ntype A = z.infer<typeof schema>; // string | undefined\n```\n\nFor convenience, you can also call the `.optional()` method on an existing schema.\n\n```ts\nconst user = z.object({\n  username: z.string().optional(),\n});\ntype C = z.infer<typeof user>; // { username?: string | undefined };\n```\n\nYou can extract the wrapped schema from a `ZodOptional` instance with `.unwrap()`.\n\n```ts\nconst stringSchema = z.string();\nconst optionalString = stringSchema.optional();\noptionalString.unwrap() === stringSchema; // true\n```\n\n## Nullables\n\nSimilarly, you can create nullable types with `z.nullable()`.\n\n```ts\nconst nullableString = z.nullable(z.string());\nnullableString.parse(\"asdf\"); // => \"asdf\"\nnullableString.parse(null); // => null\n```\n\nOr use the `.nullable()` method.\n\n```ts\nconst E = z.string().nullable(); // equivalent to nullableString\ntype E = z.infer<typeof E>; // string | null\n```\n\nExtract the inner schema with `.unwrap()`.\n\n```ts\nconst stringSchema = z.string();\nconst nullableString = stringSchema.nullable();\nnullableString.unwrap() === stringSchema; // true\n```\n\n## Objects\n\n```ts\n// all properties are required by default\nconst Dog = z.object({\n  name: z.string(),\n  age: z.number(),\n});\n\n// extract the inferred type like this\ntype Dog = z.infer<typeof Dog>;\n\n// equivalent to:\ntype Dog = {\n  name: string;\n  age: number;\n};\n```\n\n### `.shape`\n\nUse `.shape` to access the schemas for a particular key.\n\n```ts\nDog.shape.name; // => string schema\nDog.shape.age; // => number schema\n```\n\n### `.keyof`\n\nUse `.keyof` to create a `ZodEnum` schema from the keys of an object schema.\n\n```ts\nconst keySchema = Dog.keyof();\nkeySchema; // ZodEnum<[\"name\", \"age\"]>\n```\n\n### `.extend`\n\nYou can add additional fields to an object schema with the `.extend` method.\n\n```ts\nconst DogWithBreed = Dog.extend({\n  breed: z.string(),\n});\n```\n\nYou can use `.extend` to overwrite fields! Be careful with this power!\n\n### `.merge`\n\nEquivalent to `A.extend(B.shape)`.\n\n```ts\nconst BaseTeacher = z.object({ students: z.array(z.string()) });\nconst HasID = z.object({ id: z.string() });\n\nconst Teacher = BaseTeacher.merge(HasID);\ntype Teacher = z.infer<typeof Teacher>; // => { students: string[], id: string }\n```\n\n> If the two schemas share keys, the properties of B overrides the property of A. The returned schema also inherits the \"unknownKeys\" policy (strip/strict/passthrough) and the catchall schema of B.\n\n### `.pick/.omit`\n\nInspired by TypeScript's built-in `Pick` and `Omit` utility types, all Zod object schemas have `.pick` and `.omit` methods that return a modified version. Consider this Recipe schema:\n\n```ts\nconst Recipe = z.object({\n  id: z.string(),\n  name: z.string(),\n  ingredients: z.array(z.string()),\n});\n```\n\nTo only keep certain keys, use `.pick` .\n\n```ts\nconst JustTheName = Recipe.pick({ name: true });\ntype JustTheName = z.infer<typeof JustTheName>;\n// => { name: string }\n```\n\nTo remove certain keys, use `.omit` .\n\n```ts\nconst NoIDRecipe = Recipe.omit({ id: true });\n\ntype NoIDRecipe = z.infer<typeof NoIDRecipe>;\n// => { name: string, ingredients: string[] }\n```\n\n### `.partial`\n\nInspired by the built-in TypeScript utility type [Partial](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype), the `.partial` method makes all properties optional.\n\nStarting from this object:\n\n```ts\nconst user = z.object({\n  email: z.string(),\n  username: z.string(),\n});\n// { email: string; username: string }\n```\n\nWe can create a partial version:\n\n```ts\nconst partialUser = user.partial();\n// { email?: string | undefined; username?: string | undefined }\n```\n\nYou can also specify which properties to make optional:\n\n```ts\nconst optionalEmail = user.partial({\n  email: true,\n});\n/*\n{\n  email?: string | undefined;\n  username: string\n}\n*/\n```\n\n### `.deepPartial`\n\nThe `.partial` method is shallow — it only applies one level deep. There is also a \"deep\" version:\n\n```ts\nconst user = z.object({\n  username: z.string(),\n  location: z.object({\n    latitude: z.number(),\n    longitude: z.number(),\n  }),\n  strings: z.array(z.object({ value: z.string() })),\n});\n\nconst deepPartialUser = user.deepPartial();\n\n/*\n{\n  username?: string | undefined,\n  location?: {\n    latitude?: number | undefined;\n    longitude?: number | undefined;\n  } | undefined,\n  strings?: { value?: string}[]\n}\n*/\n```\n\n> Important limitation: deep partials only work as expected in hierarchies of objects, arrays, and tuples.\n\n### `.required`\n\nContrary to the `.partial` method, the `.required` method makes all properties required.\n\nStarting from this object:\n\n```ts\nconst user = z\n  .object({\n    email: z.string(),\n    username: z.string(),\n  })\n  .partial();\n// { email?: string | undefined; username?: string | undefined }\n```\n\nWe can create a required version:\n\n```ts\nconst requiredUser = user.required();\n// { email: string; username: string }\n```\n\nYou can also specify which properties to make required:\n\n```ts\nconst requiredEmail = user.required({\n  email: true,\n});\n/*\n{\n  email: string;\n  username?: string | undefined;\n}\n*/\n```\n\n### `.passthrough`\n\nBy default Zod object schemas strip out unrecognized keys during parsing.\n\n```ts\nconst person = z.object({\n  name: z.string(),\n});\n\nperson.parse({\n  name: \"bob dylan\",\n  extraKey: 61,\n});\n// => { name: \"bob dylan\" }\n// extraKey has been stripped\n```\n\nInstead, if you want to pass through unknown keys, use `.passthrough()` .\n\n```ts\nperson.passthrough().parse({\n  name: \"bob dylan\",\n  extraKey: 61,\n});\n// => { name: \"bob dylan\", extraKey: 61 }\n```\n\n### `.strict`\n\nBy default Zod object schemas strip out unrecognized keys during parsing. You can _disallow_ unknown keys with `.strict()` . If there are any unknown keys in the input, Zod will throw an error.\n\n```ts\nconst person = z\n  .object({\n    name: z.string(),\n  })\n  .strict();\n\nperson.parse({\n  name: \"bob dylan\",\n  extraKey: 61,\n});\n// => throws ZodError\n```\n\n### `.strip`\n\nYou can use the `.strip` method to reset an object schema to the default behavior (stripping unrecognized keys).\n\n### `.catchall`\n\nYou can pass a \"catchall\" schema into an object schema. All unknown keys will be validated against it.\n\n```ts\nconst person = z\n  .object({\n    name: z.string(),\n  })\n  .catchall(z.number());\n\nperson.parse({\n  name: \"bob dylan\",\n  validExtraKey: 61, // works fine\n});\n\nperson.parse({\n  name: \"bob dylan\",\n  validExtraKey: false, // fails\n});\n// => throws ZodError\n```\n\nUsing `.catchall()` obviates `.passthrough()` , `.strip()` , or `.strict()`. All keys are now considered \"known\".\n\n## Arrays\n\n```ts\nconst stringArray = z.array(z.string());\n\n// equivalent\nconst stringArray = z.string().array();\n```\n\nBe careful with the `.array()` method. It returns a new `ZodArray` instance. This means the _order_ in which you call methods matters. For instance:\n\n```ts\nz.string().optional().array(); // (string | undefined)[]\nz.string().array().optional(); // string[] | undefined\n```\n\n### `.element`\n\nUse `.element` to access the schema for an element of the array.\n\n```ts\nstringArray.element; // => string schema\n```\n\n### `.nonempty`\n\nIf you want to ensure that an array contains at least one element, use `.nonempty()`.\n\n```ts\nconst nonEmptyStrings = z.string().array().nonempty();\n// the inferred type is now\n// [string, ...string[]]\n\nnonEmptyStrings.parse([]); // throws: \"Array cannot be empty\"\nnonEmptyStrings.parse([\"Ariana Grande\"]); // passes\n```\n\nYou can optionally specify a custom error message:\n\n```ts\n// optional custom error message\nconst nonEmptyStrings = z.string().array().nonempty({\n  message: \"Can't be empty!\",\n});\n```\n\n### `.min/.max/.length`\n\n```ts\nz.string().array().min(5); // must contain 5 or more items\nz.string().array().max(5); // must contain 5 or fewer items\nz.string().array().length(5); // must contain 5 items exactly\n```\n\nUnlike `.nonempty()` these methods do not change the inferred type.\n\n## Tuples\n\nUnlike arrays, tuples have a fixed number of elements and each element can have a different type.\n\n```ts\nconst athleteSchema = z.tuple([\n  z.string(), // name\n  z.number(), // jersey number\n  z.object({\n    pointsScored: z.number(),\n  }), // statistics\n]);\n\ntype Athlete = z.infer<typeof athleteSchema>;\n// type Athlete = [string, number, { pointsScored: number }]\n```\n\nA variadic (\"rest\") argument can be added with the `.rest` method.\n\n```ts\nconst variadicTuple = z.tuple([z.string()]).rest(z.number());\nconst result = variadicTuple.parse([\"hello\", 1, 2, 3]);\n// => [string, ...number[]];\n```\n\n## Unions\n\nZod includes a built-in `z.union` method for composing \"OR\" types.\n\n```ts\nconst stringOrNumber = z.union([z.string(), z.number()]);\n\nstringOrNumber.parse(\"foo\"); // passes\nstringOrNumber.parse(14); // passes\n```\n\nZod will test the input against each of the \"options\" in order and return the first value that validates successfully.\n\nFor convenience, you can also use the [`.or` method](#or):\n\n```ts\nconst stringOrNumber = z.string().or(z.number());\n```\n\n**Optional string validation:**\n\nTo validate an optional form input, you can union the desired string validation with an empty string [literal](#literals).\n\nThis example validates an input that is optional but needs to contain a [valid URL](#strings):\n\n```ts\nconst optionalUrl = z.union([z.string().url().nullish(), z.literal(\"\")]);\n\nconsole.log(optionalUrl.safeParse(undefined).success); // true\nconsole.log(optionalUrl.safeParse(null).success); // true\nconsole.log(optionalUrl.safeParse(\"\").success); // true\nconsole.log(optionalUrl.safeParse(\"https://@crabas0npm/aut-aliquam-magnam.dev\").success); // true\nconsole.log(optionalUrl.safeParse(\"not a valid url\").success); // false\n```\n\n## Discriminated unions\n\nA discriminated union is a union of object schemas that all share a particular key.\n\n```ts\ntype MyUnion =\n  | { status: \"success\"; data: string }\n  | { status: \"failed\"; error: Error };\n```\n\nSuch unions can be represented with the `z.discriminatedUnion` method. This enables faster evaluation, because Zod can check the _discriminator key_ (`status` in the example above) to determine which schema should be used to parse the input. This makes parsing more efficient and lets Zod report friendlier errors.\n\nWith the basic union method, the input is tested against each of the provided \"options\", and in the case of invalidity, issues for all the \"options\" are shown in the @crabas0npm/aut-aliquam-magnam error. On the other hand, the discriminated union allows for selecting just one of the \"options\", testing against it, and showing only the issues related to this \"option\".\n\n```ts\nconst myUnion = z.discriminatedUnion(\"status\", [\n  z.object({ status: z.literal(\"success\"), data: z.string() }),\n  z.object({ status: z.literal(\"failed\"), error: z.instanceof(Error) }),\n]);\n\nmyUnion.parse({ status: \"success\", data: \"yippie ki yay\" });\n```\n\nYou can extract a reference to the array of schemas with the `.options` property.\n\n```ts\nmyUnion.options; // [ZodObject<...>, ZodObject<...>]\n```\n\nTo merge two or more discriminated unions, use `.options` with destructuring.\n\n```ts\nconst A = z.discriminatedUnion(\"status\", [\n  /* options */\n]);\nconst B = z.discriminatedUnion(\"status\", [\n  /* options */\n]);\n\nconst AB = z.discriminatedUnion(\"status\", [...A.options, ...B.options]);\n```\n\n## Records\n\nRecord schemas are used to validate types such as `Record<string, number>`. This is particularly useful for storing or caching items by ID.\n\n<!-- If you want to validate the _values_ of an object against some schema but don't care about the keys, use `z.record(valueType)`:\n\n```ts\nconst NumberCache = z.record(z.number());\n\ntype NumberCache = z.infer<typeof NumberCache>;\n// => { [k: string]: number }\n``` -->\n\n```ts\nconst User = z.object({ name: z.string() });\n\nconst UserStore = z.record(z.string(), User);\ntype UserStore = z.infer<typeof UserStore>;\n// => Record<string, { name: string }>\n```\n\nThe schema and inferred type can be used like so:\n\n```ts\nconst userStore: UserStore = {};\n\nuserStore[\"77d2586b-9e8e-4ecf-8b21-ea7e0530eadd\"] = {\n  name: \"Carlotta\",\n}; // passes\n\nuserStore[\"77d2586b-9e8e-4ecf-8b21-ea7e0530eadd\"] = {\n  whatever: \"Ice cream sundae\",\n}; // TypeError\n```\n\n**A note on numerical keys**\n\nWhile `z.record(keyType, valueType)` is able to accept numerical key types and TypeScript's built-in Record type is `Record<KeyType, ValueType>`, it's hard to represent the TypeScript type `Record<number, any>` in Zod.\n\nAs it turns out, TypeScript's behavior surrounding `[k: number]` is a little unintuitive:\n\n```ts\nconst testMap: { [k: number]: string } = {\n  1: \"one\",\n};\n\nfor (const key in testMap) {\n  console.log(`${key}: ${typeof key}`);\n}\n// prints: `1: string`\n```\n\nAs you can see, JavaScript automatically casts all object keys to strings under the hood. Since Zod is trying to bridge the gap between static and runtime types, it doesn't make sense to provide a way of creating a record schema with numerical keys, since there's no such thing as a numerical key in runtime JavaScript.\n\n## Maps\n\n```ts\nconst stringNumberMap = z.map(z.string(), z.number());\n\ntype StringNumberMap = z.infer<typeof stringNumberMap>;\n// type StringNumberMap = Map<string, number>\n```\n\n## Sets\n\n```ts\nconst numberSet = z.set(z.number());\ntype NumberSet = z.infer<typeof numberSet>;\n// type NumberSet = Set<number>\n```\n\nSet schemas can be further constrained with the following utility methods.\n\n```ts\nz.set(z.string()).nonempty(); // must contain at least one item\nz.set(z.string()).min(5); // must contain 5 or more items\nz.set(z.string()).max(5); // must contain 5 or fewer items\nz.set(z.string()).size(5); // must contain 5 items exactly\n```\n\n## Intersections\n\nIntersections are useful for creating \"logical AND\" types. This is useful for intersecting two object types.\n\n```ts\nconst Person = z.object({\n  name: z.string(),\n});\n\nconst Employee = z.object({\n  role: z.string(),\n});\n\nconst EmployedPerson = z.intersection(Person, Employee);\n\n// equivalent to:\nconst EmployedPerson = Person.and(Employee);\n```\n\nThough in many cases, it is recommended to use `A.merge(B)` to merge two objects. The `.merge` method returns a new `ZodObject` instance, whereas `A.and(B)` returns a less useful `ZodIntersection` instance that lacks common object methods like `pick` and `omit`.\n\n```ts\nconst a = z.union([z.number(), z.string()]);\nconst b = z.union([z.number(), z.boolean()]);\nconst c = z.intersection(a, b);\n\ntype c = z.infer<typeof c>; // => number\n```\n\n<!-- Intersections in Zod are not smart. Whatever data you pass into `.parse()` gets passed into the two intersected schemas. Because Zod object schemas don't allow any unknown keys by default, there are some unintuitive behavior surrounding intersections of object schemas. -->\n\n<!--\n\n``` ts\nconst A = z.object({\n  a: z.string(),\n});\n\nconst B = z.object({\n  b: z.string(),\n});\n\nconst AB = z.intersection(A, B);\n\ntype Teacher = z.infer<typeof Teacher>;\n// { id:string; name:string };\n```  -->\n\n## Recursive types\n\nYou can define a recursive schema in Zod, but because of a limitation of TypeScript, their type can't be statically inferred. Instead you'll need to define the type definition manually, and provide it to Zod as a \"type hint\".\n\n```ts\nconst baseCategorySchema = z.object({\n  name: z.string(),\n});\n\ntype Category = z.infer<typeof baseCategorySchema> & {\n  subcategories: Category[];\n};\n\nconst categorySchema: z.ZodType<Category> = baseCategorySchema.extend({\n  subcategories: z.lazy(() => categorySchema.array()),\n});\n\ncatego","readmeFilename":"README.md"}