[RFC] Allow validators to operate on list items - was: `AttributeError: 'BoxList' object has no attribute 'get'`on calling validate()
Open
Not a Bug
RFC
wontfix
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 347
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
settings.toml
```toml
[[PROVIDERS]]
PROVIDER_NAME = "A"
TYPE = "1"
[[PROVIDERS]]
PROVIDER_NAME = "B"
TYPE = 1
```
app.py
```python
from dynaconf import Dynaconf, Validator
settings = Dynaconf()
settings.validators.register(Validator('PROVIDERS.TYPE', is_type_of=str))
settings.validators.validate()
```
throws `AttributeError: 'BoxList' object has no attribute 'get'`
Expected behaviour would be, that dynaconf runs the defined validator on all values inside the list of dicts of PROVIDERS.
Contributor guide
Assessment
This issue has not been assessed yet.