# pydantic.errors.EmailError: value is not a valid email address

- **ID:** `python/pydantic-email-format-invalid`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using EmailStr type, the input string does not conform to email format (e.g., missing @, invalid domain).

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use EmailStr from pydantic: email: EmailStr
   ```
2. **** (90% success)
   ```
   Sanitize input before validation: @field_validator('email', mode='before') def clean(cls, v): return v.strip()
   ```

## Dead Ends

- **** — Custom regex may not capture all email edge cases, leading to false positives. (60% fail)
- **** — Empty string is not a valid email, even if optional. (70% fail)
