Factory to augment JS classes with validation methods
Your solution works, and is perfectly functional, but it's bad practice.

What you're describing is the service locator anti-pattern, it means that instead of passing what you need to a function, you pass a magic box that holds what you need and many other things, and it's the responsibility of your consuming class to know this magic box (called a service locator), and be tightly coupled with it, to get the object it really needs. It's a redundant layer of abstraction that only makes things harder instead of easier.

Do you have a Matrix class? Pass it a MatrixValidator with a .validate() method. Have a Checkbox class? Pass it a CheckboxValidator with a .validate() method.

This way, your actual classes don't need to know anything about their validators, they only see an object with a .validate() method, and the .validate() method gets implemented differently for each validator. That's called polymorphism, and it's a powerful tool in your OO arsenal.

Additionally, dynamically adding methods to constructors (a.k.a. classes) is frowned upon, because it makes it hard to read. With the polymorphism method, all of your methods are known at write time, and nothing is added in runtime, which is good for both readability and performance.

Now, you might ask, "who will determine which Validator instance to inject to each of my classes", that would be "the entity that creates your instances", normally, that would be a factory of some sort, otherwise, look up Dependency Injection for a good pattern to follow.