Skip to content

Commit 41d75e7

Browse files
Merge pull request #1974 from tomer953/patch-3
Missing npm install command for ValidationPipe
2 parents 0b1c815 + cbf40f5 commit 41d75e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

content/techniques/validation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ In the [Pipes](/pipes) chapter, we went through the process of building simple p
1616

1717
#### Using the built-in ValidationPipe
1818

19+
To begin using it, we first install the required dependency.
20+
21+
```bash
22+
$ npm i --save class-validator class-transformer
23+
```
24+
1925
> info **Hint** The `ValidationPipe` is exported from the `@nestjs/common` package.
2026
2127
Because this pipe uses the `class-validator` and `class-transformer` libraries, there are many options available. You configure these settings via a configuration object passed to the pipe. Following are the built-in options:

0 commit comments

Comments
 (0)