Is there a way that you can provide some sort of function to a Joi validation schema that will pre-process the value before it gets validated by Joi rules? For example, if a user inputs a date in some arbitrary format, can I call some processing function that formats the input prior to undergoing Joi validation?
const schema = Joi.object({
"date": Joi.someFunc((originalValue) => {
return convertToSomeFormat(originalValue);
}).date(),
});