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

- **ID:** `python/pydantic-deprecated-validator-v1`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pydantic v2 removed the v1 `@validator` decorator; using it (or importing from `pydantic` top-level) raises a user error.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Replace `@validator('x')` with `@field_validator('x')` and `@classmethod`; note `values` dict becomes a second positional arg `info`.
   ```
2. **** (90% success)
   ```
   Use `@model_validator(mode='after')` for cross-field validation.
   ```

## Dead Ends

- **** — Pinning to Pydantic v1 avoids the error but loses v2 performance and features. (30% fail)
- **** — Importing `validator` from `pydantic.deprecated` works temporarily but emits DeprecationWarning and will be removed. (50% fail)
