-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Migrate the getCountryIdFormat() function from switch statement to registry lookup.
Parent Epic
#13 - Convert main dispatcher to registry pattern
Depends On
- feat: Implement validator registry #50 - Implement validator registry
Current State
- Incomplete switch statement
- Many countries missing format info
Target State
```typescript
export function getCountryIdFormat(countryCode: string): IdFormat | null {
const validator = registry.get(countryCode);
if (!validator) {
return null;
}
return validator.getFormat();
}
```
Tasks
- Add getFormat() to all validators
- Register format functions
- Replace switch with registry lookup
- Complete missing format info
- Remove old switch code
Acceptance Criteria
- All existing tests pass
- All countries have format info
- No breaking API changes
Labels
refactor, migration, format
Metadata
Metadata
Assignees
Labels
No labels