hapijs / joi

The most powerful data validation library for JS
Other
20.95k stars 1.51k forks source link

Validate the validation: Disallow certain feature/combinations #2893

Open christian-schwaderer opened 1 year ago

christian-schwaderer commented 1 year ago

Support plan

Context

How can we help?

I'm setting up a new project which is expected to get quite large. Having very strict validation from the very beginning is crucial. However, in large projects with many people working on them, things tend to get out of hand and eventually less strict validation sneaks in. Once that's the case, it's hard to make the validation strict again (I've been there). So, I was just wondering: Is there a way to automatically enforce strict validation by reducing the options/possibilities of Joi?

I was thinking of disallowing:

Is that possible somehow?