# fastapi.exceptions.RequestValidationError: 422 - query parameter 'page' must be greater than or equal to 1

- **ID:** `python/fastapi-query-param-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

查询参数不符合定义的约束条件，如最小值为 1。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   使用 Query(ge=1) 定义参数约束。
   ```
2. **** (90% success)
   ```
   添加全局验证错误处理器返回清晰消息。
   ```
3. **** (85% success)
   ```
   在客户端和服务器端都进行验证。
   ```

## Dead Ends

- **** — 忽略错误，不检查参数值。 (80% fail)
- **** — 尝试在前端限制，但后端仍不验证。 (60% fail)
- **** — 修改约束但忘记更新文档。 (70% fail)
