NestJS ObjectId Validator and Parser

JSON →
library 4.0.4 ·javascript
verified Jun 5, 2026

nestjs-object-id (v4.0.4) provides MongoDB ObjectId validation and parsing for NestJS applications, supporting REST APIs, GraphQL, DTOs, and Microservices. It includes pipes (IsObjectIdPipe, ParseObjectIdPipe) and decorators (@IsObjectId, @ParseObjectId) that integrate seamlessly with NestJS's validation pipeline. Requires @nestjs/common ^10 || ^11, class-validator ^0.14.1, class-transformer ^0.5.1, and mongoose ^7 || ^8 || ^9. Maintained with regular updates; the latest version requires @nestjs/common >=10.2.7 for pipes to work correctly.