
Introductionexpress 사용할때는 각 함수마다 받아오는 데이터를 직접 검증했음.예를들어 로그인하려는데 아이디 길이나 비밀번호 이런거 정규식 주로 사용함.nestJs에서는 dto라는게 있어서 매우 편한거같음. 이걸 소개할까함 # 먼저 설치npm install class-validator class-transformer # main.ts 수정 app.useGlobalPipes(new ValidationPipe({ transform: true, // DTO 타입 자동 변환 whitelist: true, // DTO에 정의되지 않은 속성 제거 forbidNonWhitelisted: true, // 정의되지 않은 속성이 있으면 400 에러 ..