# django.core.exceptions.ValidationError: {'field': [ValidationError(['This field is required.'])]}

- **ID:** `python/django-form-validation-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

表单提交时缺少必填字段

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.2 | active | — | — |
| 4.0 | active | — | — |
| 5.0 | active | — | — |

## Workarounds

1. **在表单中提供该字段的值** (100% success)
   ```
   确保 HTML 表单包含该字段并提交数据
   ```
2. **修改表单字段为可选** (95% success)
   ```
   在表单类中设置 required=False
   ```

## Dead Ends

- **在模型中设置 blank=True** — 模型允许空值，但表单仍然要求必填 (70% fail)
- **忽略验证直接保存** — 表单验证无法绕过 (100% fail)
