Open zuozp8 opened 4 years ago
@zuozp8 Great idea, although I'm not sure about the badges.
Just need to add a line to each method indicating if it is a multi rule or override rule. There is also the question of whether greater()
and similar should support multi.
@hueniverse I would love to work on this.
@brianle1301 go ahead and make the docs changes. Actually changing the multi flag requires a breaking change so not going to change for now.
@hueniverse Yeah I meant the doc changes.
Context
What are you trying to achieve or the steps to reproduce ?
In joi v15 i could apply
greater
contraint twice and both were evaluated during validation:currently in v17.2 this validation passes, as
greater('now')
overwritesgreater(Joi.ref('from'))
I looked into the code and I see flag
multi: true
in some rules likeany.custom
or 'string.pattern', it should be documented.For example those rules could get badge
[![multi](https://img.shields.io/badge/multi-blue.svg)](#multi)
pointing to new seciton in docs about overwriting/appending rules