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
Interesting, so it's not actually the ref in the .max(). It's .example().
If you remove .example() from the "fromDate" child the schema compiles fine. And actually, I think if you just rearrange the order so that .example is called before .max it will also work.
Oh yeah, we've seen this before but with .min. See the discussion here.
Since the "fix" would be rather involved, there is nothing really left that's actionable here. I am going to bump the discussion issue on the underlying issue over here though.
Context
What are you trying to achieve or the steps to reproduce ?
When trying to do the validation from a date dependant for another one and using
joi.ref(...)
an error related to a bad example occurs.Here the code snippet to reproduce the problem:
Which result you had ?
What did you expect ?
Return json data expected for this API.
The text was updated successfully, but these errors were encountered: