The Joi API has changed since Mosh recorded the course and you may need to use schema.validate as shown here.
schema.validate