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
node.js
v23.7.0
17.13.3
No response
express
I found this issue: #2889
Which introduced encodeUri. But this option can't be used (while it is documented).
encodeUri
Is this a regression?
From what I understand, I should be able to use the domain option to validate URIs that contain Unicode characters (IDN): https://joi.dev/api/?v=17.13.3#stringurioptions
domain
For example:
Joi.object({ url: Joi.string().uri({ allowRelative: false, domain: { allowUnicode: true, tlds: false, } }) })
But that does not work. Am I doing something wrong, or is this indeed a bug?
Schema:
Data to validate:
{ url: "https://ëxample.com" }
Output:
{ "url" /* "url" must be a valid uri */: "https://ëxample.com" }
Sandbox reproduction:
For it to validate URIs that contain IDN, when the allowUnicode domain option is enabled.
allowUnicode
IOW: for it to behave like domain (which does work as expected)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Runtime
node.js
Runtime version
v23.7.0
Module version
17.13.3
Last module version without issue
No response
Used with
express
Any other relevant information
I found this issue: #2889
Which introduced
encodeUri
. But this option can't be used (while it is documented).Is this a regression?
What are you trying to achieve or the steps to reproduce?
From what I understand, I should be able to use the
domain
option to validate URIs that contain Unicode characters (IDN):https://joi.dev/api/?v=17.13.3#stringurioptions
For example:
But that does not work. Am I doing something wrong, or is this indeed a bug?
What was the result you got?
Schema:
Data to validate:
Output:
Sandbox reproduction:
What result did you expect?
For it to validate URIs that contain IDN, when the
allowUnicode
domain option is enabled.IOW: for it to behave like domain (which does work as expected)
The text was updated successfully, but these errors were encountered: