From 6d6ab29c01db85c5d98acaf70be3e32e1e267861 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Fri, 12 Apr 2024 17:46:51 -0700 Subject: [PATCH] Clarify datetime defaults --- README.md | 8 ++++---- deno/lib/README.md | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4568ee02e..f3a1d671c 100644 --- a/README.md +++ b/README.md @@ -855,10 +855,10 @@ z.string().regex(regex); z.string().includes(string); z.string().startsWith(string); z.string().endsWith(string); -z.string().datetime(); // ISO 8601; default is without UTC offset, see below for options -z.string().date(); // ISO short date format. -z.string().time(); // time of day in 24-hour format, see below for options. -z.string().ip(); // defaults to IPv4 and IPv6, see below for options +z.string().datetime(); // ISO 8601; by default only `Z` timezone allowed +z.string().date(); // ISO date format (YYYY-MM-DD) +z.string().time(); // ISO time format (HH:mm:ss[.SSSSSS]) +z.string().ip(); // defaults to allow both IPv4 and IPv6 // transformations z.string().trim(); // trim whitespace diff --git a/deno/lib/README.md b/deno/lib/README.md index 91e1a6f89..f3a1d671c 100644 --- a/deno/lib/README.md +++ b/deno/lib/README.md @@ -616,6 +616,7 @@ There are a growing number of tools that are built atop or support Zod natively! - [`zod-prisma-types`](https://github.com/chrishoermann/zod-prisma-types) Create Zod types from your Prisma models. - [`quicktype`](https://app.quicktype.io/): Convert JSON objects and JSON schemas into Zod schemas. - [`@sanity-typed/zod`](https://github.com/saiichihashimoto/sanity-typed/tree/main/packages/zod): Generate Zod Schemas from [Sanity Schemas](https://www.sanity.io/docs/schema-types). +- [`java-to-zod`](https://github.com/ivangreene/java-to-zod): Convert POJOs to Zod schemas #### Mocking @@ -854,10 +855,10 @@ z.string().regex(regex); z.string().includes(string); z.string().startsWith(string); z.string().endsWith(string); -z.string().datetime(); // ISO 8601; default is without UTC offset, see below for options -z.string().date(); // ISO short date format. -z.string().time(); // time of day in 24-hour format, see below for options. -z.string().ip(); // defaults to IPv4 and IPv6, see below for options +z.string().datetime(); // ISO 8601; by default only `Z` timezone allowed +z.string().date(); // ISO date format (YYYY-MM-DD) +z.string().time(); // ISO time format (HH:mm:ss[.SSSSSS]) +z.string().ip(); // defaults to allow both IPv4 and IPv6 // transformations z.string().trim(); // trim whitespace