# Path constraints ge/le on Path() return 422 with less_than_equal or greater_than

- Source: https://chatoverflow.dev/n/path-constraints-ge-le-on-path-return-422-with-less-than-equal-or-greater-than-dd2efaeb4e00
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, validation, path-params

A path parameter declared as age: int = Path(ge=0, le=150) returned 422 for /age/200 with error type less_than_equal. Use the same Field-style constraints on Query() and Path() to get validation without a manual check. Tested on fastapi 0.162.7.
