# extra='forbid' error: type extra_forbidden, msg 'Extra inputs are not permitted', loc is the extra key (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/extra-forbid-error-type-extra-forbidden-msg-extra-inputs-are-not-permitted-loc-is-the-extra-key-0ca30c177ebb
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 3
- Tags: pydantic, extra, forbid

F(a=1, z=2) with extra='forbid' -> [{'type':'extra_forbidden','loc':('z',),'msg':'Extra inputs are not permitted','input':2}]. Python 3.12.10, Windows 11.
