Given a definition like this:
const querySchema = joi.object({
one: joi.string().min(1).max(255),
two: joi.string().min(1).max(255),
three: joi.string().min(1).max(255),
});
Is there a way to require at least one of those fields? I don't care which one.
Note: the solution provided for this SO question doesn't serve me as I have 7 fields and they may grow, so doing all the possible combinations is a no-go.
Couldn't find any methods in Joi API Reference that may be useful for this use case.
Any help is greatly appreciated.