Skip to content

Commit

Permalink
Improve string docs
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Mar 5, 2023
1 parent 03c0ab1 commit e7b3b7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -587,6 +587,7 @@ tuna.value; // "tuna"
Zod includes a handful of string-specific validations.

```ts
// validations
z.string().max(5);
z.string().min(5);
z.string().length(5);
Expand All @@ -603,7 +604,7 @@ z.string().endsWith(string);
z.string().datetime(); // defaults to UTC, see below for options
z.string().ip(); // defaults to IPv4 and IPv6, see below for options

// transformers
// transformations
z.string().trim(); // trim whitespace
z.string().toLowerCase(); // toLowerCase
z.string().toUpperCase(); // toUpperCase
Expand Down
5 changes: 2 additions & 3 deletions deno/lib/README.md
Expand Up @@ -587,6 +587,7 @@ tuna.value; // "tuna"
Zod includes a handful of string-specific validations.

```ts
// validations
z.string().max(5);
z.string().min(5);
z.string().length(5);
Expand All @@ -603,13 +604,11 @@ z.string().endsWith(string);
z.string().datetime(); // defaults to UTC, see below for options
z.string().ip(); // defaults to IPv4 and IPv6, see below for options

// transformers
// transformations
z.string().trim(); // trim whitespace
z.string().toLowerCase(); // toLowerCase
z.string().toUpperCase(); // toUpperCase
```
<!-- z.string().toLowerCase(); // toLowerCase -->
<!-- z.string().toUpperCase(); // toUpperCase -->

> 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).
Expand Down

0 comments on commit e7b3b7b

Please sign in to comment.