Skip to content

Commit 4e8c1f2

Browse files
author
Carbon Digital
authored
docs(pipes): Add CreateCatDto with Joi schema example
1 parent 4c65bf4 commit 4e8c1f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

content/pipes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ const createCatSchema = Joi.object({
303303
age: Joi.number().required(),
304304
breed: Joi.string().required(),
305305
})
306+
307+
export class CreateCatDto {
308+
name: string;
309+
age: number;
310+
breed: string;
311+
}
306312
```
307313

308314
We do that using the `@UsePipes()` decorator as shown below:

0 commit comments

Comments
 (0)