Validators which check other fields don't work with edit_inline
|Reported by:||Esaj||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Validators which check other fields don't work with edit_inline.
django.core.validators.RequiredIfOtherFieldEquals for example:
This validates by checking if
self.other_value. However, with edit_inline,
all_data contains keys of the form
foo.0.field_name, hence using
self.other_field as a key for
all_data doesn't work.
Ideally, for edit_inline, the validator should be passed a modified
all_data dict with only the relevant fields in it. Maybe
DotExpandedDict would come in handy when implementing this?