# JSON Schema enum validation fails due to case sensitivity mismatch

- **ID:** `data/json-schema-enum-case`
- **Domain:** data
- **Category:** validation_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

JSON Schema enum validation is case-sensitive by default, but input data may contain values with different casing (e.g., 'Active' vs 'active'), causing rejection.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| JSON Schema Draft 2020-12 | active | — | — |
| Ajv 8.12.0 | active | — | — |
| Python jsonschema 4.17.0 | active | — | — |

## Workarounds

1. **Normalize input data to match enum casing before validation: data['status'] = data['status'].lower(); then validate against enum ['active', 'inactive']** (95% success)
   ```
   Normalize input data to match enum casing before validation: data['status'] = data['status'].lower(); then validate against enum ['active', 'inactive']
   ```
2. **Expand enum to include all case variants: "enum": ["Active", "active", "ACTIVE"]** (85% success)
   ```
   Expand enum to include all case variants: "enum": ["Active", "active", "ACTIVE"]
   ```

## Dead Ends

- **Adding 'caseInsensitive': true to the schema definition** — JSON Schema does not support case-insensitive enum matching natively; custom keywords may not be portable. (85% fail)
- **Using pattern validation with regex for each enum value** — This only works in specific validators and is not standard JSON Schema. (70% fail)
