Refactoring Validation Logic Not working

Linking similar issue

Node.js validateReturn function: Joi.objectId not a function - Node - Code with Mosh Forum