diff --git a/content/pipes.md b/content/pipes.md index fdae4f4446..fb68876a9e 100644 --- a/content/pipes.md +++ b/content/pipes.md @@ -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.