We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
17.13.0
The documentation on extending joi is not really helpful in writing new rules, nor does it explain how to globally extend joi to support new rules
For example, I want to extend joi by adding a .file() which has .min(bytes) and .max(bytes)
.file()
.min(bytes)
.max(bytes)
I am using joi.object() as a base (since almost everything in JS is an object, like FileList and File)
joi.object()
When I add a rule min I get a console error stating: Error: Rule conflict in file min. This is (probably) because joi.object().min already exists.
min
Error: Rule conflict in file min
joi.object().min
The documentation mentions:
overrides: A hash of method names and their overridden implementation. To refer to the parent method, use $_parent()
$_parent()
But doesn't explain how to use it or how one can override the base schema rules.
Invalid rule
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Module version
17.13.0
What documentation problem did you notice?
The documentation on extending joi is not really helpful in writing new rules, nor does it explain how to globally extend joi to support new rules
For example, I want to extend joi by adding a
.file()
which has.min(bytes)
and.max(bytes)
I am using
joi.object()
as a base (since almost everything in JS is an object, like FileList and File)When I add a rule
min
I get a console error stating:Error: Rule conflict in file min
. This is (probably) becausejoi.object().min
already exists.The documentation mentions:
But doesn't explain how to use it or how one can override the base schema rules.
Invalid rule
The text was updated successfully, but these errors were encountered: