You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you trying to achieve or the steps to reproduce ?
Describe your issue here, include schemas and inputs you are validating if needed.
constdefaultJoi=Joi.defaults((schema)=>{switch(schema.type){case'object': // it cannot be reached, since object schema's type is function.
...
}})// this is not defaulted.defaultJoi.object()
What did you expect ?
#1256 introduces Joi.defaults() feature, however, there is a conflict in joi's API: type getter & Joi.object().type()
Type getter or mapping function of Joi.defaults() should be redesigned.
The text was updated successfully, but these errors were encountered:
Context
What are you trying to achieve or the steps to reproduce ?
Describe your issue here, include schemas and inputs you are validating if needed.
What did you expect ?
#1256 introduces
Joi.defaults()
feature, however,there is a conflict in joi's API: type getter & Joi.object().type()
Type getter or mapping function of
Joi.defaults()
should be redesigned.The text was updated successfully, but these errors were encountered: