NestJS File Upload Multiple File Type Verification

I had this problem limiting the types of files going to the backend using Nestjs.

So I built a custom validator, here's how it looks:

And here's how I use it in my Controller class:

Pretty neat hm?

Like what you see? Check out my projects and my youtube channel, or give me a thanks on Twitter.