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
Joi.string().hostname() handles CIDR notation as a valid hostname:
Joi.string().hostname()
const Joi = require('joi'); const hostnameSchema = Joi.string().hostname(); console.log(hostnameSchema.validate('10.10.10.10/24'));
No validation error
A validation error with a "value" must be a valid hostname message field
"value" must be a valid hostname
message
The text was updated successfully, but these errors were encountered:
fix: Joi.string().hostname() not returning errors for CIDR notation
172017c
Fixes hapijs#2648
Successfully merging a pull request may close this issue.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
Joi.string().hostname()
handles CIDR notation as a valid hostname:What was the result you got?
No validation error
What result did you expect?
A validation error with a
"value" must be a valid hostname
message
fieldThe text was updated successfully, but these errors were encountered: