Automatic Validation
noun
say it: “aw-tuh-MAT-ik val-ih-DAY-shun” /ˌɔtəˈmætɪk ˌvælɪˈdeɪʃən/
FastAPI checking each request against the route's type hints and models before your code runs, and answering 422 with the reasons when it doesn't fit.
What is Automatic Validation?
FastAPI validates automatically: if a request has the wrong types or missing fields, it replies with a 422 error explaining exactly what's wrong, before your code runs.
In a sentence
- “Thanks to automatic validation, the route never saw an age written as "twenty".”
- “Automatic validation replaced forty lines of if statements.”
Level: Apprentice · More FastAPI terms at this level
Updated