We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Usecase: a dict with keys where the name shows which kind of validator should be used to validate it. e.g.
{ "val_foo": 1 "val_bar": 2 "str_foo: "hello" "str_bar": "world" }
To validate this directly something like this would be nice:
Dict(extra=[ (Str(pattern="val_.*"), Int()), (Str(pattern = "str_.*), Str()) ])
I didn't find a way to avoid link the key and value validator. Splitting this up via OneOf fails if both kinds of keys are present.
The text was updated successfully, but these errors were encountered:
Good point! However, I would like to implement more general solution.
Sorry, something went wrong.
No branches or pull requests
Usecase: a dict with keys where the name shows which kind of validator should be used to validate it.
e.g.
To validate this directly something like this would be nice:
I didn't find a way to avoid link the key and value validator. Splitting this up via OneOf fails if both kinds of keys are present.
The text was updated successfully, but these errors were encountered: