title: Why DTOs are not throwing Validation error in nestjs?
body: <p>I am using DTO in my code, and I am getting the response as expected but in code DTOs are not throwing error for example </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>export class CreateCatDto {
    
    readonly name: string;
    readonly age: number;
    readonly breed: string;
    
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>In this name, age, the breed is a required field and each has their data type but while running on the postman when I am not passing all the required field or only one field into postman body I am not getting any errors like age is required if I have passed other two fields or I have given value of the parameter not according to data type like:- age : twenty five then also it should throw error but I am not getting.</p>
  
  <p>So, This is class created for </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import { ApiProperty } from '@nestjs/swagger';
  
  export class Cat {
  
    @ApiProperty({ example: 'Kitty', description: 'The name of the Cat' })
    name: string;
  
    @ApiProperty({ example: 1, description: 'The age of the Cat' })
    age: number;
  
    @ApiProperty({
      example: 'Maine Coon',
      description: 'The breed of the Cat',
    })
    
    breed: string;
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is controller in which I am importing class and Dto.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import { Body, Controller, Get, Param, Post } from '@nestjs/common';
  import {
    ApiBearerAuth,
    ApiOperation,
    ApiResponse,
    ApiTags,
  } from '@nestjs/swagger';
  
  import { CatsService } from './cats.service';
  import { Cat } from './classes/cat.class';
  import { CreateCatDto } from './dto/create-cat.dto';
  
  @ApiBearerAuth()
  @ApiTags('cats')
  @Controller('cats')
  export class CatsController {
    constructor(private readonly catsService: CatsService) {}
  
    @Post()
  
    @ApiOperation({ summary: 'Create cat' })
  
    @ApiResponse({ status: 403, description: 'Forbidden.' })
  
    async create(@Body() createCatDto: CreateCatDto): Promise&lt;Cat&gt; {
  
      return this.catsService.create(createCatDto);
    }
  }</code></pre>
  </div>
  </div>
  </p>