Skip to content

파이프 사용시 transform=true 로 설정해야 dto 오버라이딩 가능 #2

Description

@seongjihye1994

클라이언트에서 데이터 받아서 dto 에 담을 때 클라이언트에서 넘겨준 데이터 이외에 dto 에 있는 다른 필드는 디폴트 값 설정하려고 했는데 안됐음 -> validationPipe 사용하고 있었고 옵션에 transform=true 로 설정 안해줘서 오버라이딩 안돼서 dto 디폴트 값 설정 안됐음

https://stackoverflow.com/questions/55478828/is-it-possible-to-set-default-values-for-a-dto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions