@ Джонатан Рис.Это решение, которое у меня изначально было, оно не чистое, но оно работает, но я рекомендую @Jerome Code.
@pre_load(pass_many=True)
def validate_existing_account_info(self, data, many):
print(data)
#raise ValidationError(data)
if 'field1' not in data and 'field2' not in data and 'field3' not in data:
pass
elif 'field1' in data and 'field2' not in data or 'field3' not in data:
raise ValidationError("Must provide all the required info")
elif 'field3' in data and 'field1' not in data or 'field2' not in data:
raise ValidationError("Must provide all the required info")
elif 'field2' in data and 'field1' not in data or 'field3' not in data:
raise ValidationError("Must provide all the required info")