---
title: "Discussion on \"Understanding Data Transfer Objects (DTOs) and Validators in NestJS.\" | Hashnode"
description: "Discussion on \"Understanding Data Transfer Objects (DTOs) and Validators in NestJS.\". Learn about DTOs and Validators in NestJS. Discover how DTOs define data shapes and Validators ensure data validity. Explore custom validators in nestjs."
url: "https://hashnode.com/posts/understanding-data-transfer-objects-dtos-and-validators-in-nestjs/6407813b498910cbf9f60aa5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Understanding Data Transfer Objects (DTOs) and Validators in NestJS.](https://ajibadeabd.hashnode.dev/understanding-data-transfer-objects-dtos-and-validators-in-nestjs?utm_source=hashnode&utm_medium=feed)

Learn about DTOs and Validators in NestJS. Discover how DTOs define data shapes and Validators ensure data validity. Explore custom validators in nestjs.

Mar 7, 2023 · 4 min read · ajibadeabd.hashnode.dev  
Read the article

-   [#nestjs](https://hashnode.com/tag/nestjs)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[abdullah ajibade](https://hashnode.com/@ajibadeabd)

@ajibadeabd

  
[View profile](https://hashnode.com/@ajibadeabd)

kordjs

## Responses 2

Markdown supported · ⌘↵ to post

[abdullah ajibade](https://hashnode.com/@ajibadeabd)

[Mar 8, 2023](https://hashnode.com/posts/understanding-data-transfer-objects-dtos-and-validators-in-nestjs/6407813b498910cbf9f60aa5/comment/6408b76305e9d6e8212c633d)

Noted.

[Natã Estanislau Bastos](https://hashnode.com/@nataneb32)

[Mar 8, 2023](https://hashnode.com/posts/understanding-data-transfer-objects-dtos-and-validators-in-nestjs/6407813b498910cbf9f60aa5/comment/6407ec046c8cbdd4116b84d0)

I don't think you should use the dto pattern in 2023. It adds more boilerplate to your application.

You can usually get away with not using it, just using the entity directly + some parameters.

And when you see a need for it. Just name it CreateUserParams and don't call it CreateUserDTO, DTO has no meaning at all. Use a more semantic name schema.
