Hi,
below one is my schema:-
schema: Joi.object().keys({
start_time: Joi.date().timestamp().required(),
end_time: Joi.date().timestamp().greater(Joi.ref('start_time')).required(),
}),
currently above schema validate only end date is greater than start date but I also want to add one more condition like end date is equal to start date and it should pass.
is there any solution for that?
Use .min() instead of .greater().
Most helpful comment
Use
.min()instead of.greater().