Expand description
BIC (Bank Identifier Code) / SWIFT code validation rule.
Validates per ISO 9362:2022:
- 4 alpha-only characters: institution code
- 2 alpha-only characters: country code (ISO 3166-1 alpha-2)
- 2 alphanumeric characters: location code
- Optional 3 alphanumeric characters: branch code
Total length: 8 or 11 characters.
The pattern also matches the generated type annotation:
[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}
Structsยง
- BicRule
- Validates a value as a BIC/SWIFT code.