Skip to content

Create UI: update Person Address Schema to make postal code optional for specific countries #31953

Closed

Description

@severinbeauvais
  • Create a custom validator to make postal code optional for the following countries:
    NO_POSTAL_CODE_COUNTRY_CODES = {
    "AO", "AG", "AW", "BS", "BZ", "BJ", "BM", "BO", "BQ", "BW", "BF", "BI",
    "CM", "CF", "TD", "KM", "CG", "CD", "CK", "CI", "CW", "DJ", "DM", "GQ",
    "ER", "FJ", "TF", "GA", "GM", "GH", "GD", "GY", "HM", "HK",
    "KI", "KP", "LY", "MO", "MW", "ML", "MR", "NR",
    "AN", "NU", "QA", "RW", "KN", "ST", "SC", "SL", "SX", "SB", "SO", "SR", "SY",
    "TL", "TG", "TK", "TO", "TT", "TV", "UG", "AE", "VU", "YE", "ZW"
    }
  • Apply the custom validator to the PersonAddressSchema object.
  • Identify and test all affected filings (list them below).
    • affected filing 1
    • affected filing 2
    • etc
  • Add unit tests if it makes sense.

Activity

  1. added
    Entities Team
    on Jan 7, 2026
  2. changed the title [-]Create UI: update Person Address Schema to make postal code optional for special countries[/-] [+]Create UI: update Person Address Schema to make postal code optional for specific countries[/+] on Jan 7, 2026
  3. severinbeauvais commented on Feb 10, 2026

    @severinbeauvais
    CollaboratorAuthor

    Test Notes

    For any filing in Create UI, where a non-Canadian address is allowed (eg, any party):

    • for an address in Canada, postal code is required (and format must be valid)
    • for an address in, say, HK, postal code is neither required nor validated

    You can test:

    • completing party in a bootstrap filing
    • completing party in a firm dissolution
    • directors
    • custodian of records in a corp dissolution
  4. severinbeauvais commented on Feb 11, 2026

    @severinbeauvais
    CollaboratorAuthor

    I found that the postal code "optional" label isn't working as expected for:

    • corp voluntary dissolution custodian of records
    • coop voluntary dissolution custodian of records

    The reason for this is that I used the "required" (instead of "isRequiredPostalCode") validator, on the basis that a non-Canada address would be rejected anyway. This is fine but it means the postal code label won't update if you cycle through countries (even though only Canada is valid).

    I'll post again here on whether I decide to leave this as-is or change it. see below

  5. severinbeauvais commented on Feb 11, 2026

    @severinbeauvais
    CollaboratorAuthor

    I have decided to use "isRequiredPostalCode" for all postal codes (not just those that must be in Canada), which makes the Postal Code label dynamic -- it automatically changes when you change the country (eg, between Canada and Hong Kong). This is consistent with other dynamic labels and no longer looks like a bug.

  6. self-assigned this
    on Feb 17, 2026
  7. gunanagar commented on Feb 17, 2026

    @gunanagar
    Collaborator

    Tested, all good. Few screeshot for ref.

    Screenshot 2026-02-17 at 3.49.05 PM.png

    Screenshot 2026-02-17 at 3.49.35 PM.png

  8. gunanagar commented on Feb 17, 2026

    @gunanagar
    Collaborator

    Screenshot 2026-02-17 at 4.49.10 PM.png

    Screenshot 2026-02-17 at 4.49.40 PM.png

    Screenshot 2026-02-17 at 4.50.16 PM.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities Team

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions