-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Additional joi validation #65
Comments
Could you not do this by simply using |
You are right. It can be done using So, we will probably go with |
You can also use the extensions feature. That might behave more like you are wanting because you can fully extend joi that way. I’m happy to look at a PR still. Depending on how it fits in with the theme of enjoi I don’t see an issue with accepting such a change. |
The PR is ready. |
Description:
Would you consider a PR for the ability to add additional Joi validation to the converted schemas?
Joi supports this using schema concatenation. So it will be something like:
This will give great flexibility to
Enjoi
by enabling the use of the full potential ofJoi
.Background:
In our project we need to have more precise validation than what JSON Schema provides. E.g. for dates we want not only to match the
YYYY-MM-DD
format from RFC3339 Section 5.6, but also apply the restrictions from Section 5.7 - forbid the 31st day for Feb, Apr, etc.The text was updated successfully, but these errors were encountered: