Set async: true on the constraint, decorate it with @Injectable() so NestJS manages it, and call useContainer() in main.ts to allow class-validator to resolve services from the NestJS DI container. Register the constraint class as a provider in your module.
Call useContainer(app.select(AppModule), { fallbackOnErrors: true }) in main.ts before app.listen().
Decorate the constraint class with @Injectable() so NestJS manages its instantiation.
Register the constraint class in the providers array of the relevant module.
Set async: true on both @ValidatorConstraint and in registerDecorator options.
Without useContainer(), the injected service is always undefined — a silent failure.