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
#497 found a regression in validator function of fields in 2.0.1 dependent on prior fields. #499 purported to both fix this, and add tests to prevent future regressions.
Actually what I've found is slightly different (i.e. not a re-regression), but the docs suggest should be fine. I'll update. It looks like it's all in the same vein.
rlupton20
changed the title
Field validator re-regression
Field validator regression on dependent fields
Feb 26, 2019
In the above case we do populate error dictionary with an error to say field1 isn't set, but run _validate_model for field2 anyway, despite the fact there may be some dependency on something we already errored on.
Some ideas
error before running the _validate_model functions if some data doesn't have the required properties. Then we lose having all errors at once.
Become aware of dependencies in the _validate_models function. Perhaps handle failed data key lookups by cross-referencing with the current error dictionary? It all seems a bit gross.
#497 found a regression in validator function of fields in 2.0.1 dependent on prior fields. #499 purported to both fix this, and add tests to prevent future regressions.
I've produced a similar issue for dependent fields in 2.1.0. The docs here
https://schematics.readthedocs.io/en/latest/usage/validation.html#model-level-validation
suggest this should be handled.
produces
Tested in the
python:3.7
docker container - just pip install schematics and run the above to reproduce.The text was updated successfully, but these errors were encountered: