Relative Content

Tag Archive for nestjsprisma

How to validate nestjs request body with DTO when using Prisma

How do I prevent a client from sending an id in the UserUpdateDto. The User object contains an id (among other things) that I don’t want them to be able to update. However, despite what I’ve tried below, they can still pass an id in the body and that updates the property.