Skip to content

[bug] Integer-like strings in validator defaults are incorrectly cast to integers  #585

@JacobCallahan

Description

@JacobCallahan

When specifying a default value for a validator of "+172800", dynaconf is casting the post-validation value to an integer 172800. This is still true after explicitly adding is_type_of=str to the validator.
Interestingly enough, performing another validation after this point fails the validation.

Validator section including the offending validator
Screenshot from 2021-05-11 10-53-25

Example of the problem
Screenshot from 2021-05-11 10-49-20

Dynaconf shouldn't be explicitly casting default values to another type when not explicitly conflicting with the is_type_of value.

Environment:

  • OS: Fedora: 33
  • Dynaconf Version: 3.1.4
  • Frameworks in use: None

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions