Skip to content

Commit

Permalink
docs: fix link to z.preprocess in Supporting date strings (#1319)
Browse files Browse the repository at this point in the history
* docs: fix link to z.preprocess in Supporting date strings

* docs: fix link to z.preprocess in Supporting date strings

* Remove parens

Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
  • Loading branch information
genie-youn and Colin McDonnell committed Aug 9, 2022
1 parent f923706 commit 814c1eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ z.date().max(new Date(), { message: "Too young!" });

**Supporting date strings**

To write a schema that accepts either a `Date` or a date string, use (`z.preprocess`)[#preprocess].
To write a schema that accepts either a `Date` or a date string, use [`z.preprocess`](#preprocess).

```ts
const dateSchema = z.preprocess((arg) => {
Expand Down
3 changes: 2 additions & 1 deletion deno/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ There are a growing number of tools that are built atop or support Zod natively!
- [`zod-xlsx`](https://github.com/sidwebworks/zod-xlsx): A xlsx based resource validator using Zod schemas.
- [`remix-domains`](https://github.com/SeasonedSoftware/remix-domains/): Improves end-to-end type safety in [Remix](https://remix.run/) by leveraging Zod to parse the framework's inputs such as FormData, URLSearchParams, etc.
- [`@zodios/core`](https://github.com/ecyrbe/zodios): A typescript API client with runtime and compile time validation backed by axios and zod.
- [`@runtyping/zod`](https://github.com/johngeorgewright/runtyping/tree/master/packages/zod): Generate zod from static types & JSON schema.

#### Form integrations

Expand Down Expand Up @@ -588,7 +589,7 @@ z.date().max(new Date(), { message: "Too young!" });

**Supporting date strings**

To write a schema that accepts either a `Date` or a date string, use (`z.preprocess`)[#preprocess].
To write a schema that accepts either a `Date` or a date string, use [`z.preprocess`](#preprocess).

```ts
const dateSchema = z.preprocess((arg) => {
Expand Down

0 comments on commit 814c1eb

Please sign in to comment.