Detectors
Postal Code (DE)
Detect and validate German postal codes (PLZ) in 5-digit format.
Purpose
Use the postal_code detector (region de) for German postal codes (Postleitzahl / PLZ).
This detector uses pattern matching with German postal code format validation.
Detector Name
postal_codeRegion: de
Supported Formats
DDDDD(5-digit format)
German postal codes range from 01001 to 99998.
Usage
from fastpii import FastPII, DEFAULT_PRIORITY
from fastpii.countries.de import GermanPack
engine = FastPII(priority=DEFAULT_PRIORITY)
engine.register(GermanPack())
result = engine.detect("PLZ 10115 Berlin")Validation
result = engine.validate("10115", "postal_code")
# result.is_valid → TrueMetadata
- Region-based format validation
- All entries use ASCII transliteration