I was validating the parameters of the function get in one of this way. It's works but look like the code is unclean.
It works well, but I decorators make it looks clean and easy to read:
Also, it works for
constructor or properties:
To install run one of this instructions:
npm install validatorjs-decorator
yarn add validatorjs-decorator