Skip to content

Rename and Coerce do not work together #607

@aaron11496

Description

@aaron11496
>>> import cerberus
>>> cerberus.__version__
'1.3.4'
>>> from cerberus.validator import Validator
>>> Validator().normalized({'f': '123'}, schema={'f': {'type': 'integer', 'coerce': int}})
{'f': 123}
>>> Validator().normalized({'f': '123'}, schema={'f': {'type': 'integer', 'coerce': int, 'rename': 'g'}})
{'g': '123'}

I would expect the coerce to still take effect here. Please let me know whether this is intended behavior or if there is another way to do what I intended.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions