Joi version is 17.3.0
Your code worked and solved my issue! Thank you so much. Can you explain why I needed to return each name, email, password instead of just the user passed in the function?
another quick question, I tried to rewrite the code with
return schema.validate(_.pick([ ‘name’, ‘email’, ‘password’]));
but it returned “name” is required. Why is that? I required lodash in the beginning of my script