-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
Looking through the docs it looks like references are supported for min/max for Dates:
var schema = Joi.object({
from: Joi.date().required(),
to: Joi.date().min(Joi.ref('from')).required()
});But I'm not seeing the equivalent available for Numbers. So
var schema = Joi.object({
minLength: Joi.number().required(),
maxLength: Joi.number().min(Joi.ref('minLength')).required()
});Throws an error due to limit not being an integer. The same thing occurs for the following uses: Number.min(), Number.max(), Number.greater(), Number.less()
Is this functionality not yet supported or is there some other way for me to compare two numeric values via a reference?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement