entity
entity copied to clipboard
Business API: Add validation for Canadian Postal Codes
Background
The Business API currently accepts postal code values without enforcing a specific format. The FE applies validation for Canadian postal codes, which can result in inconsistent behavior between the FE and API when submitting address data for Canadian addresses.
Proposal
Add API-level validation to enforce the Canadian postal code format, aligned with the Frontend validation rules. Validation should:
- Enforce the standard Canadian postal code pattern: A1A 1A1
- Allow a single optional space between the third and fourth characters (max length = 7)
- Enforce case-sensitivity? (FE only accepts all uppercase)
List of Impacted Filings (WIP):
- IA
- COD
- COA