풀소유

  • 홈
  • 태그
  • 방명록

유효성 검사 1

커스텀파이프로 데이터 바인딩 및 유효성 검사

요청 유효성 검사 UserUpdateDto export class UserUpdateDto { @IsNotIn([' ']) @Length(1, 7) nickname: string; @MaxDate(new Date()) birthdate: Date; } @IsNotIn()는 리스트를 파라미터로 받아 리스트 안에 객체와 같으면 BadRequest를 응답한다. ParseUserUpdateDtoPipe 요청으로 넘어오는 birthdate는 String이다. 때문에 Date 타입으로 변경해야 한다. CustomException은 HttpException을 상속한 커스텀 예외이다. export class ParseUserUpdateDtoPipe implements PipeTransform { transform(va..

Javascript/NestJS 2023.03.13
이전
1
다음
더보기
프로필사진

Starting is the perfect condition

  • 분류 전체보기
    • CSS
    • JVM
      • JPA
      • SpringCloud
      • SpringMVC
      • Kotlin
    • Javascript
      • React
      • NestJS
      • NuxtJS
    • Database
      • Redis
      • Postgresql
    • CS
      • Linux
      • 네트워크
    • DevOps
      • AWS
      • K8S
      • Container
      • VM
      • ElasticSearch
    • wsl2
    • 디자인 패턴
    • 자료구조 & 알고리즘
    • 도서
    • 금융
    • GraphQL
    • Keycloak
    • 정보처리기사

Tag

oauth2, com.vladmihalcea:bibernate-types, authguard, AuroraDB, env, JPA, @MapsId, 일대일 식별, github actions, 조인테이블, 상송 관계 매핑, QClass, postgresql 배열, 파이프, nestjs, querydsl, 슈퍼-서브 타입 모델링, 커스텀 파이프, AWS, postgre array,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바