We generally work as, doing validation and doing all sort of validation in validator and we expect that if the request reaches controller it has already been validated againsts all the application criteria, i.e., if an owner and adming both can create a user but admin can create user on any branch but owner can create user on only his branch then the route create user can be used by both admin and owner.
all kind of complex validation logic before the controller, i.e., in nest it will be in validationPipe.
is it the correct approach in nest ? or i should do this role based validation in service, and if it is okey then how to do this complex validation in class validator or should i use some other validation library such as joi. Thanks