# pydantic.error_wrappers.ValidationError: Model 的 1 个验证错误
field
  缺少必填字段 [type=missing, input_value={}, input_type=dict]

- **ID:** `python/pydantic-required-field-missing`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

实例化模型时未提供没有默认值的字段，导致缺少字段错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 2.x | active | — | — |

## 解决方案

1. **** (100% 成功率)
   ```
   Provide the field during instantiation: Model(field='value')
   ```
2. **** (95% 成功率)
   ```
   Add a default value: field: str = 'default'
   ```

## 无效尝试

- **** — Setting default=None makes field optional, but if None is not valid for the type, it may still fail. (50% 失败率)
- **** — model_construct skips validation but may leave fields unset, causing issues later. (80% 失败率)
