diff --git a/marshmallow/fields.py b/marshmallow/fields.py
index d2ea022f..5a0835da 100755
--- a/marshmallow/fields.py
+++ b/marshmallow/fields.py
@@ -1125,12 +1125,20 @@ class TimeDelta(Field):
 
 
 class Dict(Field):
-    """A dict field. Supports dicts and dict-like objects.
+    """A dict field. Supports dicts and dict-like objects. Optionally composed
+    with another `Field` class or instance.
+
+    Example: ::
+
+        numbers = fields.Dict(values=fields.Float(), keys=fields.Str())
+
+    :param Field values: A field class or instance for dict values.
+    :param Field keys: A field class or instance for dict keys.
+    :param kwargs: The same keyword arguments that :class:`Field` receives.
 
     .. note::
-        This field is only appropriate when the structure of
-        nested data is not known. For structured data, use
-        `Nested`.
+        When the structure of nested data is not known, you may omit the
+        `values` and `keys` arguments to prevent content validation.
 
     .. versionadded:: 2.1.0
     """
@@ -1139,11 +1147,85 @@ class Dict(Field):
         'invalid': 'Not a valid mapping type.'
     }
 
-    def _deserialize(self, value, attr, data):
-        if isinstance(value, collections.Mapping):
-            return value
+    def __init__(self, values=None, keys=None, **kwargs):
+        super(Dict, self).__init__(**kwargs)
+        if values is None:
+            self.value_container = None
+        elif isinstance(values, type):
+            if not issubclass(values, FieldABC):
+                raise ValueError('"values" must be a subclass of '
+                                 'marshmallow.base.FieldABC')
+            self.value_container = values()
+        else:
+            if not isinstance(values, FieldABC):
+                raise ValueError('"values" must be of type '
+                                 'marshmallow.base.FieldABC')
+            self.value_container = values
+        if keys is None:
+            self.key_container = None
+        elif isinstance(keys, type):
+            if not issubclass(keys, FieldABC):
+                raise ValueError('"keys" must be a subclass of '
+                                 'marshmallow.base.FieldABC')
+            self.key_container = keys()
         else:
+            if not isinstance(keys, FieldABC):
+                raise ValueError('"keys" must be of type '
+                                 'marshmallow.base.FieldABC')
+            self.key_container = keys
+
+    def _serialize(self, value, attr, obj):
+        if value is None:
+            return None
+        if not self.value_container and not self.key_container:
+            return value
+        if isinstance(value, collections.Mapping):
+            values = value.values()
+            if self.value_container:
+                values = [self.value_container._serialize(item, attr, obj) for item in values]
+            keys = value.keys()
+            if self.key_container:
+                keys = [self.key_container._serialize(key, attr, obj) for key in keys]
+            return dict(zip(keys, values))
+        self.fail('invalid')
+
+    def _deserialize(self, value, attr, data):
+        if not isinstance(value, collections.Mapping):
             self.fail('invalid')
+        if not self.value_container and not self.key_container:
+            return value
+
+        errors = {}
+        values = list(value.values())
+        keys = list(value.keys())
+        if self.key_container:
+            for idx, key in enumerate(keys):
+                try:
+                    keys[idx] = self.key_container.deserialize(key)
+                except ValidationError as e:
+                    errors[key] = [
+                        'Invalid key: {}'.format(message)
+                        for message in e.messages
+                    ]
+        if self.value_container:
+            for idx, item in enumerate(values):
+                try:
+                    values[idx] = self.value_container.deserialize(item)
+                except ValidationError as e:
+                    values[idx] = e.data
+                    key = keys[idx]
+                    if key not in errors:
+                        errors[key] = []
+                    errors[key].extend([
+                        'Invalid value: {}'.format(message)
+                        for message in e.messages
+                    ])
+        result = dict(zip(keys, values))
+
+        if errors:
+            raise ValidationError(errors, data=result)
+
+        return result
 
 
 class ValidatedField(Field):

How to create a Schema containing a dict of nested Schema?
Hi. I've been digging around and couldn't find the answer to this.

Say I've got a model like this:

``` python
class AlbumSchema(Schema):
    year = fields.Int()

class ArtistSchema(Schema):
    name = fields.Str()
    albums = ...
```

I want `albums` to be a `dict` of `AlbumSchema`, so that `ArtistSchema` serializes as

``` python
{ 'albums': { 'Hunky Dory': {'year': 1971},
              'The Man Who Sold the World': {'year': 1970}},
  'name': 'David Bowie'}
```

Naively, I would expect syntaxes like this to work:

``` python
fields.List(Schema)
fields.Dict(Schema)
```

or maybe

``` python
fields.List(fields.Nested(Schema))
fields.Dict(fields.Nested(Schema))
```

Serializing a `list` of `Schema` can be achieved through `Nested(Schema, many=True)`, which I find less intuitive, and I don't know about a `dict` of `Schema`.

Is there any way to do it? Or a good reason _not_ to do it?

(Question also [asked on SO](http://stackoverflow.com/questions/38048775/marshmallow-dict-of-nested-schema).)

diff --git a/tests/test_deserialization.py b/tests/test_deserialization.py
index adaba296..3e2a7c37 100644
--- a/tests/test_deserialization.py
+++ b/tests/test_deserialization.py
@@ -542,6 +542,51 @@ class TestFieldDeserialization:
             field.deserialize('baddict')
         assert excinfo.value.args[0] == 'Not a valid mapping type.'
 
+    def test_structured_dict_value_deserialization(self):
+        field = fields.Dict(values=fields.Str)
+        assert field.deserialize({"foo": "bar"}) == {"foo": "bar"}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({"foo": 1, "bar": "baz"})
+        assert excinfo.value.args[0] == {'foo': ['Invalid value: Not a valid string.']}
+        assert excinfo.value.data == {'bar': 'baz', 'foo': None}
+
+    def test_structured_dict_key_deserialization(self):
+        field = fields.Dict(keys=fields.Str)
+        assert field.deserialize({"foo": "bar"}) == {"foo": "bar"}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({1: "bar", "foo": "baz"})
+        assert excinfo.value.args[0] == {1: ['Invalid key: Not a valid string.']}
+        assert excinfo.value.data == {'foo': 'baz', 1: "bar"}
+
+    def test_structured_dict_key_value_deserialization(self):
+        field = fields.Dict(
+            keys=fields.Str(validate=[validate.Email(), validate.Regexp(r'.*@test\.com$')]),
+            values=fields.Decimal,
+        )
+        assert field.deserialize({"foo@test.com": 1}) == {"foo@test.com": decimal.Decimal(1)}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({1: "bar"})
+        assert excinfo.value.args[0] == {1: [
+            'Invalid key: Not a valid string.',
+            'Invalid value: Not a valid number.',
+        ]}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({"foo@test.com": "bar"})
+        assert excinfo.value.args[0] == {"foo@test.com": ['Invalid value: Not a valid number.']}
+        assert excinfo.value.data == {'foo@test.com': None}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({1: 1})
+        assert excinfo.value.args[0] == {1: ['Invalid key: Not a valid string.']}
+        assert excinfo.value.data == {1: 1}
+        with pytest.raises(ValidationError) as excinfo:
+            field.deserialize({"foo": "bar"})
+        assert excinfo.value.args[0] == {"foo": [
+            'Invalid key: Not a valid email address.',
+            'Invalid key: String does not match expected pattern.',
+            'Invalid value: Not a valid number.',
+        ]}
+        assert excinfo.value.data == {'foo': None}
+
     def test_url_field_deserialization(self):
         field = fields.Url()
         assert field.deserialize('https://duckduckgo.com') == 'https://duckduckgo.com'
diff --git a/tests/test_serialization.py b/tests/test_serialization.py
index 3f3c290d..718078c7 100644
--- a/tests/test_serialization.py
+++ b/tests/test_serialization.py
@@ -388,6 +388,27 @@ class TestFieldSerialization:
         assert field.serialize('various_data', user) == \
             OrderedDict([("foo", "bar"), ("bar", "baz")])
 
+    def test_structured_dict_value_serialize(self, user):
+        user.various_data = {"foo": decimal.Decimal('1')}
+        field = fields.Dict(values=fields.Decimal)
+        assert field.serialize('various_data', user) == {"foo": 1}
+
+    def test_structured_dict_key_serialize(self, user):
+        user.various_data = {1: "bar"}
+        field = fields.Dict(keys=fields.Str)
+        assert field.serialize('various_data', user) == {"1": "bar"}
+
+    def test_structured_dict_key_value_serialize(self, user):
+        user.various_data = {1: decimal.Decimal('1')}
+        field = fields.Dict(keys=fields.Str, values=fields.Decimal)
+        assert field.serialize('various_data', user) == {"1": 1}
+
+    def test_structured_dict_validates(self, user):
+        user.various_data = {"foo": "bar"}
+        field = fields.Dict(values=fields.Decimal)
+        with pytest.raises(ValidationError):
+            field.serialize('various_data', user)
+
     def test_url_field_serialize_none(self, user):
         user.homepage = None
         field = fields.Url()

pip install -e .[reco]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
3.9
dev-requirements.txt requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
backports.tarfile==1.2.0
cachetools==5.5.2
certifi==2025.1.31
cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
coverage==7.8.0
cryptography==44.0.2
distlib==0.3.9
docutils==0.21.2
exceptiongroup==1.2.2
execnet==2.1.1
filelock==3.18.0
flake8==2.4.1
id==1.5.0
idna==3.10
importlib_metadata==8.6.1
iniconfig==2.1.0
invoke==0.21.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jeepney==0.9.0
keyring==25.6.0
markdown-it-py==3.0.0
-e git+https://github.com/marshmallow-code/marshmallow.git@12044877d8af3d8f07c39bf0c5df78d3d7a22df1#egg=marshmallow
mccabe==0.3.1
mdurl==0.1.2
more-itertools==10.6.0
nh3==0.2.21
packaging==24.2
pep8==1.7.1
platformdirs==4.3.7
pluggy==1.5.0
py==1.11.0
pycparser==2.22
pyflakes==0.8.1
Pygments==2.19.1
pyproject-api==1.9.0
pytest==8.3.5
pytest-asyncio==0.26.0
pytest-cov==6.0.0
pytest-mock==3.14.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
pytz==2025.2
readme_renderer==44.0
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==14.0.0
SecretStorage==3.3.3
simplejson==3.20.1
six==1.17.0
tomli==2.2.1
tox==4.25.0
twine==6.1.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3
zipp==3.21.0

name: marshmallow
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - backports-tarfile==1.2.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cffi==1.17.1
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - coverage==7.8.0
      - cryptography==44.0.2
      - distlib==0.3.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - execnet==2.1.1
      - filelock==3.18.0
      - flake8==2.4.1
      - id==1.5.0
      - idna==3.10
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - invoke==0.21.0
      - jaraco-classes==3.4.0
      - jaraco-context==6.0.1
      - jaraco-functools==4.1.0
      - jeepney==0.9.0
      - keyring==25.6.0
      - markdown-it-py==3.0.0
      - mccabe==0.3.1
      - mdurl==0.1.2
      - more-itertools==10.6.0
      - nh3==0.2.21
      - packaging==24.2
      - pep8==1.7.1
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - py==1.11.0
      - pycparser==2.22
      - pyflakes==0.8.1
      - pygments==2.19.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - pytest-asyncio==0.26.0
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - pytest-xdist==3.6.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - readme-renderer==44.0
      - requests==2.32.3
      - requests-toolbelt==1.0.0
      - rfc3986==2.0.0
      - rich==14.0.0
      - secretstorage==3.3.3
      - simplejson==3.20.1
      - six==1.17.0
      - tomli==2.2.1
      - tox==4.25.0
      - twine==6.1.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - zipp==3.21.0
prefix: /opt/conda/envs/marshmallow

tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_value_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_key_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_key_value_deserialization tests/test_serialization.py::TestFieldSerialization::test_structured_dict_key_serialize tests/test_serialization.py::TestFieldSerialization::test_structured_dict_key_value_serialize tests/test_serialization.py::TestFieldSerialization::test_structured_dict_validates
tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[String] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Integer] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Boolean] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Float] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Number] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[DateTime] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[LocalDateTime] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Time] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Date] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[TimeDelta] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Dict] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Url] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Email] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[FormattedString] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[UUID] tests/test_deserialization.py::TestDeserializingNone::test_fields_allow_none_deserialize_to_none[Decimal] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[String] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Integer] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Boolean] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Float] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Number] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[DateTime] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[LocalDateTime] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Time] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Date] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[TimeDelta] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Dict] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Url] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Email] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[FormattedString] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[UUID] tests/test_deserialization.py::TestDeserializingNone::test_fields_dont_allow_none_by_default[Decimal] tests/test_deserialization.py::TestDeserializingNone::test_allow_none_is_true_if_missing_is_true tests/test_deserialization.py::TestDeserializingNone::test_list_field_deserialize_none_to_empty_list tests/test_deserialization.py::TestFieldDeserialization::test_float_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_invalid_float_field_deserialization[bad] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_float_field_deserialization[] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_float_field_deserialization[in_val2] tests/test_deserialization.py::TestFieldDeserialization::test_integer_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_strict_integer_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_with_places tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_with_places_and_rounding tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_deserialization_string tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_special_values tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_special_values_not_permitted tests/test_deserialization.py::TestFieldDeserialization::test_string_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization_with_custom_truthy_values tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization_with_custom_truthy_values_invalid[notvalid] tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization_with_custom_truthy_values_invalid[123] tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization_with_empty_truthy tests/test_deserialization.py::TestFieldDeserialization::test_boolean_field_deserialization_with_custom_falsy_values tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserialization[not-a-datetime] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserialization[42] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserialization[] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_datetime_deserialization[in_value3] tests/test_deserialization.py::TestFieldDeserialization::test_datetime_passed_year_is_invalid tests/test_deserialization.py::TestFieldDeserialization::test_datetime_passed_date_is_invalid tests/test_deserialization.py::TestFieldDeserialization::test_custom_date_format_datetime_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_rfc_datetime_field_deserialization[rfc] tests/test_deserialization.py::TestFieldDeserialization::test_rfc_datetime_field_deserialization[rfc822] tests/test_deserialization.py::TestFieldDeserialization::test_iso_datetime_field_deserialization[iso] tests/test_deserialization.py::TestFieldDeserialization::test_iso_datetime_field_deserialization[iso8601] tests/test_deserialization.py::TestFieldDeserialization::test_localdatetime_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_time_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_invalid_time_field_deserialization[badvalue] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_time_field_deserialization[] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_time_field_deserialization[in_data2] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_time_field_deserialization[42] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_precision tests/test_deserialization.py::TestFieldDeserialization::test_timedelta_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[badvalue] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[in_value2] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_timedelta_field_deserialization[9999999999] tests/test_deserialization.py::TestFieldDeserialization::test_date_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_invalid_date_field_deserialization[] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_date_field_deserialization[123] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_date_field_deserialization[in_value2] tests/test_deserialization.py::TestFieldDeserialization::test_dict_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_url_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_relative_url_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_url_field_schemes_argument tests/test_deserialization.py::TestFieldDeserialization::test_email_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_function_field_deserialization_is_noop_by_default tests/test_deserialization.py::TestFieldDeserialization::test_function_field_deserialization_with_callable tests/test_deserialization.py::TestFieldDeserialization::test_function_field_deserialization_with_context tests/test_deserialization.py::TestFieldDeserialization::test_function_field_passed_deserialize_only_is_load_only tests/test_deserialization.py::TestFieldDeserialization::test_function_field_passed_deserialize_and_serialize_is_not_load_only tests/test_deserialization.py::TestFieldDeserialization::test_uuid_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_invalid_uuid_deserialization[malformed] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_uuid_deserialization[123] tests/test_deserialization.py::TestFieldDeserialization::test_invalid_uuid_deserialization[in_value2] tests/test_deserialization.py::TestFieldDeserialization::test_deserialization_function_must_be_callable tests/test_deserialization.py::TestFieldDeserialization::test_method_field_deserialization_is_noop_by_default tests/test_deserialization.py::TestFieldDeserialization::test_deserialization_method tests/test_deserialization.py::TestFieldDeserialization::test_deserialization_method_must_be_a_method tests/test_deserialization.py::TestFieldDeserialization::test_method_field_deserialize_only tests/test_deserialization.py::TestFieldDeserialization::test_datetime_list_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_invalid_item tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_multiple_invalid_items tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_value_that_is_not_a_list[notalist] tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_value_that_is_not_a_list[42] tests/test_deserialization.py::TestFieldDeserialization::test_list_field_deserialize_value_that_is_not_a_list[value2] tests/test_deserialization.py::TestFieldDeserialization::test_constant_field_deserialization tests/test_deserialization.py::TestFieldDeserialization::test_constant_is_always_included_in_deserialized_data tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_user_validator_function tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_user_validator_class_that_returns_bool tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_user_validator_that_raises_error_with_list tests/test_deserialization.py::TestFieldDeserialization::test_validator_must_return_false_to_raise_error tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_validator_with_nonascii_input tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_user_validators tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_custom_error_message tests/test_deserialization.py::TestFieldDeserialization::test_field_deserialization_with_non_utf8_value tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_to_dict tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_missing_values tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_many tests/test_deserialization.py::TestSchemaDeserialization::test_exclude tests/test_deserialization.py::TestSchemaDeserialization::test_nested_single_deserialization_to_dict tests/test_deserialization.py::TestSchemaDeserialization::test_nested_list_deserialization_to_dict tests/test_deserialization.py::TestSchemaDeserialization::test_nested_single_none_not_allowed tests/test_deserialization.py::TestSchemaDeserialization::test_nested_many_non_not_allowed tests/test_deserialization.py::TestSchemaDeserialization::test_nested_single_required_missing tests/test_deserialization.py::TestSchemaDeserialization::test_nested_many_required_missing tests/test_deserialization.py::TestSchemaDeserialization::test_nested_only_basestring tests/test_deserialization.py::TestSchemaDeserialization::test_nested_only_basestring_with_list_data tests/test_deserialization.py::TestSchemaDeserialization::test_none_deserialization tests/test_deserialization.py::TestSchemaDeserialization::test_nested_none_deserialization tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_attribute_param tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_attribute_param_symmetry tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_attribute_param_error_returns_field_name_not_attribute_name tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_attribute_param_error_returns_load_from_not_attribute_name tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_load_from_param tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_dump_only_param tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_missing_param_value tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_missing_param_callable tests/test_deserialization.py::TestSchemaDeserialization::test_deserialize_with_missing_param_none tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_returns_errors tests/test_deserialization.py::TestSchemaDeserialization::test_deserialization_returns_errors_with_multiple_validators tests/test_deserialization.py::TestSchemaDeserialization::test_strict_mode_deserialization tests/test_deserialization.py::TestSchemaDeserialization::test_strict_mode_many tests/test_deserialization.py::TestSchemaDeserialization::test_strict_mode_deserialization_with_multiple_validators tests/test_deserialization.py::TestSchemaDeserialization::test_uncaught_validation_errors_are_stored tests/test_deserialization.py::TestSchemaDeserialization::test_multiple_errors_can_be_stored_for_a_field tests/test_deserialization.py::TestSchemaDeserialization::test_multiple_errors_can_be_stored_for_an_email_field tests/test_deserialization.py::TestSchemaDeserialization::test_multiple_errors_can_be_stored_for_a_url_field tests/test_deserialization.py::TestSchemaDeserialization::test_required_value_only_passed_to_validators_if_provided tests/test_deserialization.py::TestSchemaDeserialization::test_partial_deserialization[True] tests/test_deserialization.py::TestSchemaDeserialization::test_partial_deserialization[False] tests/test_deserialization.py::TestSchemaDeserialization::test_partial_fields_deserialization tests/test_deserialization.py::TestSchemaDeserialization::test_partial_fields_validation tests/test_deserialization.py::TestValidation::test_integer_with_validator tests/test_deserialization.py::TestValidation::test_integer_with_validators[field0] tests/test_deserialization.py::TestValidation::test_integer_with_validators[field1] tests/test_deserialization.py::TestValidation::test_integer_with_validators[field2] tests/test_deserialization.py::TestValidation::test_float_with_validators[field0] tests/test_deserialization.py::TestValidation::test_float_with_validators[field1] tests/test_deserialization.py::TestValidation::test_float_with_validators[field2] tests/test_deserialization.py::TestValidation::test_string_validator tests/test_deserialization.py::TestValidation::test_function_validator tests/test_deserialization.py::TestValidation::test_function_validators[field0] tests/test_deserialization.py::TestValidation::test_function_validators[field1] tests/test_deserialization.py::TestValidation::test_function_validators[field2] tests/test_deserialization.py::TestValidation::test_method_validator tests/test_deserialization.py::TestValidation::test_nested_data_is_stored_when_validation_fails tests/test_deserialization.py::TestValidation::test_false_value_validation tests/test_deserialization.py::test_required_field_failure[String] tests/test_deserialization.py::test_required_field_failure[Integer] tests/test_deserialization.py::test_required_field_failure[Boolean] tests/test_deserialization.py::test_required_field_failure[Float] tests/test_deserialization.py::test_required_field_failure[Number] tests/test_deserialization.py::test_required_field_failure[DateTime] tests/test_deserialization.py::test_required_field_failure[LocalDateTime] tests/test_deserialization.py::test_required_field_failure[Time] tests/test_deserialization.py::test_required_field_failure[Date] tests/test_deserialization.py::test_required_field_failure[TimeDelta] tests/test_deserialization.py::test_required_field_failure[Dict] tests/test_deserialization.py::test_required_field_failure[Url] tests/test_deserialization.py::test_required_field_failure[Email] tests/test_deserialization.py::test_required_field_failure[UUID] tests/test_deserialization.py::test_required_field_failure[Decimal] tests/test_deserialization.py::test_required_message_can_be_changed[My tests/test_deserialization.py::test_required_message_can_be_changed[message1] tests/test_deserialization.py::test_required_message_can_be_changed[message2] tests/test_deserialization.py::test_deserialize_doesnt_raise_exception_if_strict_is_false_and_input_type_is_incorrect tests/test_deserialization.py::test_deserialize_raises_exception_if_strict_is_true_and_input_type_is_incorrect tests/test_serialization.py::TestFieldSerialization::test_default tests/test_serialization.py::TestFieldSerialization::test_number[42-42.0] tests/test_serialization.py::TestFieldSerialization::test_number[0-0.0] tests/test_serialization.py::TestFieldSerialization::test_number[None-None] tests/test_serialization.py::TestFieldSerialization::test_number_as_string tests/test_serialization.py::TestFieldSerialization::test_number_as_string_passed_none tests/test_serialization.py::TestFieldSerialization::test_callable_default tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_func tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_serialize_only_is_dump_only tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_deserialize_and_serialize_is_not_dump_only tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_serialize tests/test_serialization.py::TestFieldSerialization::test_function_field_does_not_swallow_attribute_error tests/test_serialization.py::TestFieldSerialization::test_function_field_load_only tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_serialize_with_context tests/test_serialization.py::TestFieldSerialization::test_function_field_passed_uncallable_object tests/test_serialization.py::TestFieldSerialization::test_integer_field tests/test_serialization.py::TestFieldSerialization::test_integer_as_string_field tests/test_serialization.py::TestFieldSerialization::test_integer_field_default tests/test_serialization.py::TestFieldSerialization::test_integer_field_default_set_to_none tests/test_serialization.py::TestFieldSerialization::test_uuid_field tests/test_serialization.py::TestFieldSerialization::test_decimal_field tests/test_serialization.py::TestFieldSerialization::test_decimal_field_string tests/test_serialization.py::TestFieldSerialization::test_decimal_field_special_values tests/test_serialization.py::TestFieldSerialization::test_decimal_field_special_values_not_permitted tests/test_serialization.py::TestFieldSerialization::test_decimal_field_fixed_point_representation tests/test_serialization.py::TestFieldSerialization::test_boolean_field_serialization tests/test_serialization.py::TestFieldSerialization::test_function_with_uncallable_param tests/test_serialization.py::TestFieldSerialization::test_email_field_validates tests/test_serialization.py::TestFieldSerialization::test_email_field_serialize_none tests/test_serialization.py::TestFieldSerialization::test_dict_field_serialize_none tests/test_serialization.py::TestFieldSerialization::test_dict_field_invalid_dict_but_okay tests/test_serialization.py::TestFieldSerialization::test_dict_field_serialize tests/test_serialization.py::TestFieldSerialization::test_dict_field_serialize_ordereddict tests/test_serialization.py::TestFieldSerialization::test_structured_dict_value_serialize tests/test_serialization.py::TestFieldSerialization::test_url_field_serialize_none tests/test_serialization.py::TestFieldSerialization::test_url_field_validates tests/test_serialization.py::TestFieldSerialization::test_method_field_with_method_missing tests/test_serialization.py::TestFieldSerialization::test_method_field_passed_serialize_only_is_dump_only tests/test_serialization.py::TestFieldSerialization::test_method_field_passed_deserialize_only_is_load_only tests/test_serialization.py::TestFieldSerialization::test_method_field_with_uncallable_attribute tests/test_serialization.py::TestFieldSerialization::test_method_field_does_not_swallow_attribute_error tests/test_serialization.py::TestFieldSerialization::test_method_with_no_serialize_is_missing tests/test_serialization.py::TestFieldSerialization::test_serialize_with_dump_to_param tests/test_serialization.py::TestFieldSerialization::test_serialize_with_attribute_and_dump_to_uses_dump_to tests/test_serialization.py::TestFieldSerialization::test_datetime_serializes_to_iso_by_default tests/test_serialization.py::TestFieldSerialization::test_datetime_invalid_serialization[invalid] tests/test_serialization.py::TestFieldSerialization::test_datetime_invalid_serialization[value1] tests/test_serialization.py::TestFieldSerialization::test_datetime_invalid_serialization[24] tests/test_serialization.py::TestFieldSerialization::test_datetime_field_rfc822[rfc] tests/test_serialization.py::TestFieldSerialization::test_datetime_field_rfc822[rfc822] tests/test_serialization.py::TestFieldSerialization::test_localdatetime_rfc_field tests/test_serialization.py::TestFieldSerialization::test_datetime_iso8601[iso] tests/test_serialization.py::TestFieldSerialization::test_datetime_iso8601[iso8601] tests/test_serialization.py::TestFieldSerialization::test_localdatetime_iso tests/test_serialization.py::TestFieldSerialization::test_datetime_format tests/test_serialization.py::TestFieldSerialization::test_string_field tests/test_serialization.py::TestFieldSerialization::test_formattedstring_field tests/test_serialization.py::TestFieldSerialization::test_formattedstring_field_on_schema tests/test_serialization.py::TestFieldSerialization::test_string_field_default_to_empty_string tests/test_serialization.py::TestFieldSerialization::test_time_field tests/test_serialization.py::TestFieldSerialization::test_invalid_time_field_serialization[badvalue] tests/test_serialization.py::TestFieldSerialization::test_invalid_time_field_serialization[] tests/test_serialization.py::TestFieldSerialization::test_invalid_time_field_serialization[in_data2] tests/test_serialization.py::TestFieldSerialization::test_invalid_time_field_serialization[42] tests/test_serialization.py::TestFieldSerialization::test_date_field tests/test_serialization.py::TestFieldSerialization::test_invalid_date_field_serialization[badvalue] tests/test_serialization.py::TestFieldSerialization::test_invalid_date_field_serialization[] tests/test_serialization.py::TestFieldSerialization::test_invalid_date_field_serialization[in_data2] tests/test_serialization.py::TestFieldSerialization::test_invalid_date_field_serialization[42] tests/test_serialization.py::TestFieldSerialization::test_timedelta_field tests/test_serialization.py::TestFieldSerialization::test_datetime_list_field tests/test_serialization.py::TestFieldSerialization::test_list_field_with_error tests/test_serialization.py::TestFieldSerialization::test_datetime_list_serialize_single_value tests/test_serialization.py::TestFieldSerialization::test_list_field_serialize_none_returns_none tests/test_serialization.py::TestFieldSerialization::test_list_field_respect_inner_attribute tests/test_serialization.py::TestFieldSerialization::test_list_field_respect_inner_attribute_single_value tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_generator_single_value tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_generators_multiple_values tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_generators_error tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_generators_empty_generator_returns_none_for_every_non_returning_yield_statement tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_set tests/test_serialization.py::TestFieldSerialization::test_list_field_work_with_custom_class_with_iterator_protocol tests/test_serialization.py::TestFieldSerialization::test_bad_list_field tests/test_serialization.py::TestFieldSerialization::test_serialize_does_not_apply_validators tests/test_serialization.py::TestFieldSerialization::test_constant_field_serialization tests/test_serialization.py::TestFieldSerialization::test_constant_is_always_included_in_serialized_data tests/test_serialization.py::TestFieldSerialization::test_constant_field_serialize_when_omitted tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[String] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Integer] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Boolean] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Float] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Number] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[DateTime] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[LocalDateTime] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Time] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Date] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[TimeDelta] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Dict] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Url] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Email] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[FormattedString] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[UUID] tests/test_serialization.py::TestFieldSerialization::test_all_fields_serialize_none_to_none[Decimal] tests/test_serialization.py::test_serializing_named_tuple tests/test_serialization.py::test_serializing_named_tuple_with_meta tests/test_serialization.py::test_serializing_slice
marshmallow/fields.py
marshmallow/fields.py