Support global checker
if the class contains a __validate_all_fields__(self) method, it will be called everytime a field is modified. This is quite heavy but might be useful in some rare cases where validation can not be done in each of the fields validators
-
you can disable this temporarily by doing "with skip_global_validation(o): ..." (implementation note: this would set a
__skip_global_validation__flag on the instance, read by the fields setters) -
or permanently with set_global_validation(o, enabled=False) ?
Do we really want that kind of complexity ? Real-world evidence needed
This is an equivalent functionality : https://zopeinterface.readthedocs.io/en/latest/README.html#invariants