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
Looking at the example, the full path that you are trying to use in patch should be /if/properties/q, not /properties/q - did you try that?
Also, it may be just a contrived example, but why do you need to repeat the keywords from if in then? If it is validating agains then, the condition in if is definitely satisfied.
Also, you might need else: false in case you want validation to fail unless condition in if is valid...
No, was a bit confused... I am not quite sure what you are trying to achieve - other than some strict mode requirements (you can either add missing type keywords or use the option strict: false) it seems to be working?
I am trying to
merge/patch
schemas based on conditions withif/then/else
. Is this generally possible?Here is a minimal reproduction CSB of what I am trying to achieve:
https://codesandbox.io/s/serene-cdn-0ugtt?file=/src/index.js
The text was updated successfully, but these errors were encountered: