Idea for patch is to capture field name also with DependencyValidationError and RequiredFieldValidationError. Also, path to field is stored for all three errors.
Possible problems with backward compatibility:
if one uses in subclasses of DependencyValidationError / RequiredFieldValidationError fieldname and/or path properties then these will be overwritten after init method.
If one has defined slots for subclasses of these two, setting fieldname and path will fail probably too.
Idea for patch is to capture field name also with DependencyValidationError and RequiredFieldValidationError. Also, path to field is stored for all three errors.
Possible problems with backward compatibility: if one uses in subclasses of DependencyValidationError / RequiredFieldValidationError fieldname and/or path properties then these will be overwritten after init method. If one has defined slots for subclasses of these two, setting fieldname and path will fail probably too.