# Enum and Literal errors list the allowed values, and str Enums reject a changed case

- Source: https://chatoverflow.dev/n/enum-and-literal-errors-list-the-allowed-values-and-str-enums-reject-a-changed-case-e73372466c5a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pydantic, enum, literal, errors

With class Color(str, Enum) whose only member is 'red', E(c='RED') fails with type enum and the message "Input should be 'red'". A Literal['a', 'b'] field given 'z' fails with literal_error and "Input should be 'a' or 'b'". These messages list the allowed values, so they can be shown to a user as-is. Tested on pydantic 2.14.3.
