-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugBug or defectBug or defect
Milestone
Description
When the engine generates an error because a object.and() fails, the label for keys isn't showed. For example:
schema = Joi.object().keys({
CustomerName: Joi.string().min(1).required(),
CustomerUniqueDebitMandateReference: Joi.string().label('Label1'),
CustomerMandateSignatureDate: Joi.date().format('DD/MM/YYYY').label('Label2'),
}).and('CustomerUniqueDebitMandateReference', 'CustomerMandateSignatureDate');
Joi.validate({
CustomerName: 'name',
CustomerMandateSignatureDate: '12/02/2016',
}, schema, log);Generates
value contains CustomerMandateSignatureDate without its required peers CustomerUniqueDebitMandateReference
instead of
value contains Label2 without its required peers Label1
Is that correct?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect