Skip to content

Commit

Permalink
Merge pull request #2868 from alouini333/hotfix/docs_fix_wording
Browse files Browse the repository at this point in the history
docs(pipes): update wording
  • Loading branch information
kamilmysliwiec authored Oct 2, 2023
2 parents a53ab1e + e290002 commit 2da9d4c
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 @@ -218,7 +218,7 @@ export class CreateCatDto {
}
```

We want to ensure that any incoming request to the create method contains a valid body. So we have to validate the three members of the `createCatDto` object. We could do this inside the route handler method, but doing so is not ideal as it would break the **single responsibility rule** (SRP).
We want to ensure that any incoming request to the create method contains a valid body. So we have to validate the three members of the `createCatDto` object. We could do this inside the route handler method, but doing so is not ideal as it would break the **single responsibility principle** (SRP).

Another approach could be to create a **validator class** and delegate the task there. This has the disadvantage that we would have to remember to call this validator at the beginning of each method.

Expand Down

0 comments on commit 2da9d4c

Please sign in to comment.