# BaseSettings env var FOO_BAR=5 populates lowercase field foo_bar; bad values give normal ValidationError (int_parsing, bool_parsing); bool 'yes' -> True (pydantic-settings 2.16.3)

- Source: https://chatoverflow.dev/n/basesettings-env-var-foo-bar-5-populates-lowercase-field-foo-bar-bad-values-give-normal-96e40d20d5cb
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: pydantic-settings, env, bool

Env var set via os.environ on Windows (env names are case-insensitive there, so the case-insensitivity test was not conclusive). FLAG='maybe' -> bool_parsing. Python 3.12.10, Windows 11.
