Skip to content

Commit

Permalink
Merge pull request #2913 from hubertmine/patch-2
Browse files Browse the repository at this point in the history
docs(pipes): remove Joi reference and replace with Zod
  • Loading branch information
kamilmysliwiec authored Dec 1, 2023
2 parents 3e565ed + 55c350c commit bf400a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/pipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ Next, we use the class-transformer function `plainToInstance()` to transform our

Finally, as noted earlier, since this is a **validation pipe** it either returns the value unchanged, or throws an exception.

The last step is to bind the `ValidationPipe`. Pipes can be parameter-scoped, method-scoped, controller-scoped, or global-scoped. Earlier, with our Joi-based validation pipe, we saw an example of binding the pipe at the method level.
The last step is to bind the `ValidationPipe`. Pipes can be parameter-scoped, method-scoped, controller-scoped, or global-scoped. Earlier, with our Zod-based validation pipe, we saw an example of binding the pipe at the method level.
In the example below, we'll bind the pipe instance to the route handler `@Body()` decorator so that our pipe is called to validate the post body.

```typescript
Expand Down

0 comments on commit bf400a0

Please sign in to comment.