# Buggy code
def call_and_store(self, getter_func, data, field_name, field_obj, index=None):
    """Call ``getter_func`` with ``data`` as its argument, and store any `ValidationErrors`.

    :param callable getter_func: Function for getting the serialized/deserialized
        value from ``data``.
    :param data: The data passed to ``getter_func``.
    :param str field_name: Field name.
    :param FieldABC field_obj: Field object that performs the
        serialization/deserialization behavior.
    :param int index: Index of the item being validated, if validating a collection,
        otherwise `None`.
    """
    try:
        value = getter_func(data)
    except ValidationError as err:  # Store validation errors
        self.error_fields.append(field_obj)
        self.error_field_names.append(field_name)
        errors = self.get_errors(index=index)
        # Warning: Mutation!
        if isinstance(err.messages, dict):
            errors[field_name] = err.messages
        else:
            errors.setdefault(field_name, []).extend(err.messages)
        # When a Nested field fails validation, the marshalled data is stored
        # on the ValidationError's data attribute
        value = err.data or missing
    return value


# Traceback (AttributeError)
Traceback (most recent call last):
File "/home/andrew/misc/marshmallow/tests/test_schema.py", line 1238, in test_all_errors_on_many_nested_field_with_validates_decorator
_, errors = outer.load({'inner': [{}]})
File "/home/andrew/misc/marshmallow/marshmallow/schema.py", line 539, in load
result, errors = self._do_load(data, many, partial=partial, postprocess=True)
File "/home/andrew/misc/marshmallow/marshmallow/schema.py", line 610, in _do_load
self._invoke_field_validators(data=result, many=many)
File "/home/andrew/misc/marshmallow/marshmallow/schema.py", line 789, in _invoke_field_validators
field_obj=field_obj
File "/home/andrew/misc/marshmallow/marshmallow/marshalling.py", line 74, in call_and_store
errors.setdefault(field_name, []).extend(err.messages)
AttributeError: 'dict' object has no attribute 'extend'

# Fixed code
def call_and_store(self, getter_func, data, field_name, field_obj, index=None):
    """Call ``getter_func`` with ``data`` as its argument, and store any `ValidationErrors`.

    :param callable getter_func: Function for getting the serialized/deserialized
        value from ``data``.
    :param data: The data passed to ``getter_func``.
    :param str field_name: Field name.
    :param FieldABC field_obj: Field object that performs the
        serialization/deserialization behavior.
    :param int index: Index of the item being validated, if validating a collection,
        otherwise `None`.
    """
    try:
        value = getter_func(data)
    except ValidationError as err:  # Store validation errors
        self.error_fields.append(field_obj)
        self.error_field_names.append(field_name)
        errors = self.get_errors(index=index)
        # Warning: Mutation!
        if isinstance(err.messages, dict):
            errors[field_name] = err.messages
        elif isinstance(errors.get(field_name), dict):
            errors[field_name].setdefault(FIELD, []).extend(err.messages)
        else:
            errors.setdefault(field_name, []).extend(err.messages)
        # When a Nested field fails validation, the marshalled data is stored
        # on the ValidationError's data attribute
        value = err.data or missing
    return value