{"id":18037960,"url":"https://github.com/quantumsheep/class-validator-mongo-object-id","last_synced_at":"2025-08-22T17:07:26.239Z","repository":{"id":57199518,"uuid":"322025792","full_name":"quantumsheep/class-validator-mongo-object-id","owner":"quantumsheep","description":"Add a decorator to validate MongoDB's ObjectId using class-validator","archived":false,"fork":false,"pushed_at":"2023-11-09T09:42:17.000Z","size":47,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T03:21:07.828Z","etag":null,"topics":["class-validator","mongodb","mongoose","nestjs","objectid","validator"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quantumsheep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-16T15:36:36.000Z","updated_at":"2024-06-23T10:06:07.000Z","dependencies_parsed_at":"2024-06-19T01:48:48.840Z","dependency_job_id":"f5c1d4a0-139e-40fd-a2fc-36b571148bb4","html_url":"https://github.com/quantumsheep/class-validator-mongo-object-id","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"f584ba790eb5a7661fa5b15c657c2349f06ada13"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quantumsheep/class-validator-mongo-object-id","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumsheep%2Fclass-validator-mongo-object-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumsheep%2Fclass-validator-mongo-object-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumsheep%2Fclass-validator-mongo-object-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumsheep%2Fclass-validator-mongo-object-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quantumsheep","download_url":"https://codeload.github.com/quantumsheep/class-validator-mongo-object-id/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quantumsheep%2Fclass-validator-mongo-object-id/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271672627,"owners_count":24800706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class-validator","mongodb","mongoose","nestjs","objectid","validator"],"created_at":"2024-10-30T13:14:26.833Z","updated_at":"2025-08-22T17:07:21.226Z","avatar_url":"https://github.com/quantumsheep.png","language":"TypeScript","readme":"[![npm](https://img.shields.io/npm/v/class-validator-mongo-object-id)](https://www.npmjs.com/package/class-validator-mongo-object-id)\n\n# ObjectId Class Validator\nThis package validates ObjectId in classes. It was originally made to be used in NestJS but works everywhere else.\n\n## How to install\n```bash\nnpm install --save class-validator-mongo-object-id\n```\n\n## How to use\nHere is an example along with commonly used `IsString` from [`class-validator`](https://github.com/typestack/class-validator) package.\n\n```ts\nimport { IsString } from 'class-validator';\nimport { IsObjectId } from 'class-validator-mongo-object-id';\n\nclass EditUserDTO {\n    @IsObjectId()\n    userId: string;\n\n    @IsString()\n    username: string;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumsheep%2Fclass-validator-mongo-object-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantumsheep%2Fclass-validator-mongo-object-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantumsheep%2Fclass-validator-mongo-object-id/lists"}