# PydanticUserError: `@validator` cannot be applied to instance methods. Use `@field_validator` instead.

- **ID:** `python/fastapi-pydantic-v2-validator-removed`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Code written for Pydantic v1 uses the removed `validator` decorator under Pydantic v2.

## Version Compatibility

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

## Workarounds

1. **** (92% success)
   ```
   Migrate to field_validator:
from pydantic import field_validator
@field_validator('name')
@classmethod
def check(cls, v): ...
   ```
2. **** (85% success)
   ```
   Use bump-pydantic to automate migration.
   ```

## Dead Ends

- **** — FastAPI 0.100+ expects v2; downgrading causes other incompatibilities. (60% fail)
- **** — Loses validation logic and may accept bad data. (70% fail)
