[NestJS] DTO validation
The problem
Ví dụ chúng ta có một DTO dưới đây, nếu mà chúng ta ko manual kiểm tra hoặc convert kiểu của các fields này thì payload hoàn toàn có thể có bất kỳ dạng data nào:
export class CreateUserDto {
username: string;
email: string;
password...
thebrownbox.hashnode.dev2 min read