-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
I have this in a few places...
joi.validate(option, {
port : joi.number().integer().min(0).max(65535)
});Given that joi is most commonly used for servers (related: string().hostname()) and port numbers are a standardized and commonly used thing, I would prefer for this to be built in.
joi.validate(option, {
port : joi.number().port()
});Beyond the readability and succinctness of it, I like that this would free my apps from having the 65535 constant, which people sometimes ask me about.
Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement