-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior: Can not double validate keys #289
Comments
Perhaps my expectation is impossible because of the need to support other functionalities. May I suggest adding some kind of "If Then" functionality? Like this:
In this example, |
One potential workaround:
Though, this will validate an empty dict. Perhaps this is still the best solution, as it shouldn't be too hard to include a
...or something of the sort. Edit:
|
Well, I would have though this would work too. But no.
|
The expected result here is that a user can supply a dict using the key 'request' or 'requests'. If 'requests' is used, then the nested dict keys should be numbered.
I assumed that the dict would validate
Or('request', 'requests', only_one=True) : dict,
and then see the optional key 'requests' was supplied. It should also validateOptional('requests'): {Use(int): dict}
. But the output seems to only allow one validation per key,See output:
The text was updated successfully, but these errors were encountered: