#ValidationPipe Date query parameter

4 messages · Page 1 of 1 (latest)

novel cloud
#

Hello, I need to ask regarding change in ValidationPipe in versions after 10.2.7. This is the commit I found causing my issue:
https://github.com/nestjs/nest/commit/f3141fbfdabd66de4485d76ce22c6e9b16dd55f8

Before this change, I could have @Query('myparam') Date date, and the Date would get transformed to Date object. However after this commit, its it not being deserialized and I was not able to find it in changelog of the newer versions. Can someone explain this to me, if current behavior is intended (and what should I change), or if it is a bug?

mystic nymph
#

This was an intended change. We don't normally want to deserialize built in classes. If that's the desired functionality, you should create a DTO that specifies this

novel cloud
#

Sure, I'll update that. Might this be good think to put in changelog? Searching nestjs implementation when tests started to fail was not really convenient 😄

mystic nymph
#

Dunno why Kamil didn't put it in a changelog to be honest