Skip to content

Officers UI: Update Officer address postal code validation  #31200

Closed

Description

@jacqueline-williams-549

When you go to an officer change and enter a postal code

  • If you do not type the postal code in the correct format or sequence (A1A 1A1) then the input field does not show the character you have typed. For instance if I type the number 3 first, it won't show up. I must type a letter first. The problem with this is that we aren't telling the user what the issue is and we aren't indicating the correct format for them to follow.
  • Also I can save the form with an incorrect postal code. For instance if I enter V3W 2 the officer form will save and I can actually submit the filing.

On the officer change page:
Screenshot 2025-11-07 at 10.21.44 AM.png

On the company info page:
Screenshot 2025-11-07 at 10.22.44 AM.png

To Do:
Update postal code validation

Notes
This is an update to existing requirements - enforcing a postal code format was not required during initial implementation because we were following the director's pattern. We have recently changed postal code validation on firms and we would like to update this pattern to match that pattern update.

Activity

  1. added
    Entities Team
    on Nov 7, 2025
  2. changed the title [-]Officer address postal code validation is not working properly[/-] [+]BUG: Officer address postal code validation is not working properly[/+] on Nov 7, 2025
  3. added
    bug
    on Nov 7, 2025
  4. changed the title [-]BUG: Officer address postal code validation is not working properly[/-] [+]Officer Change UI Officer address postal code validation is not working properly[/+] on Nov 7, 2025
  5. changed the title [-]Officer Change UI Officer address postal code validation is not working properly[/-] [+]Officer Change UI: Officer address postal code validation is not working properly[/+] on Nov 7, 2025
  6. severinbeauvais commented on Nov 12, 2025

    @severinbeauvais
    Collaborator

    @JohnamLane @deetz99 @OlgaPotiagalova Should Entities be maintaining this UI now, or does Dietrich have the ability to help?

    PS Here is the Postal Code form component, which uses masking to enforce the format. A different mechanism will be needed if we want different validation behaviour. I don't know if someone at bcgov has already invented a better Postal Code input component...

    https://github.com/bcgov/business-ui/blob/main/web/person-roles/app/components/Form/Address/PostalCode.vue

  7. added
    connect
    on Nov 13, 2025
  8. changed the title [-]Officer Change UI: Officer address postal code validation is not working properly[/-] [+]Officer Change UI: Update Officer address postal code validation [/+] on Nov 13, 2025
  9. added and removed
    connect
    on Nov 18, 2025
  10. added and removed
    Entities Team
    on Nov 26, 2025
  11. 19 remaining items

  12. severinbeauvais commented on Dec 19, 2025

    @severinbeauvais
    Collaborator

    FWIW, while working on #31312, it was decided that we would accept postal codes with or without the space.

  13. deetz99 commented on Dec 20, 2025

    @deetz99
    Collaborator

    @severinbeauvais It should be consistent though shouldn't it? It will also simplify the display since it will be in the correct format already

  14. deetz99 commented on Dec 20, 2025

    @deetz99
    Collaborator

    @jacqueline-williams-549

    Sounds good to me, I will make those updates.

    As discussed in the other ticket, the realtime updates won't be displayed until the input has had a blur event.

  15. severinbeauvais commented on Dec 22, 2025

    @severinbeauvais
    Collaborator

    It should be consistent though shouldn't it? It will also simplify the display since it will be in the correct format already

    The regex that both UIs are using handles the optional space, I believe.

    I'll leave it to our UX team to ensure consistency, since I know we're using different underlying technology.

  16. jacqueline-williams-549 commented on Dec 23, 2025

    @jacqueline-williams-549
    Author

    @deetz99
    If work hasn't started on this yet can we switch back to using only one error message?
    So if they enter the incorrect format or an invalid character, display "Enter a valid postal code" in both scenarios.

    Thanks @severinbeauvais, yes we should probably allow for an optional space so we don't break paste behavior, but after the data is saved it would be nice if it reads as A1A 1A1 on the output documents so all addresses have a consistent format. It would be great if we could also convert the alpha characters to be capitalized after the postal code is saved.

  17. deetz99 commented on Jan 5, 2026

    @deetz99
    Collaborator

    @jacqueline-williams-549

    This has been done already, do you not want a format hint in the error message?

  18. jacqueline-williams-549 commented on Jan 6, 2026

    @jacqueline-williams-549
    Author

    @deetz99 Sorry for the confusion. I don't want to conflict with established patterns, but I believe this came up because we were getting alot of calls and problems with users putting in the wrong format - specifically that people would put a zero when they meant a letter O and vice versa. So I think the format hint is important here.

    But now that most of the designers and design leads are back online I can get some input from them and if they have any concerns about the approach, I can put it into another ticket since this has been implemented already and let the PO decide how it gets prioritized if that sounds good you.

  19. deetz99 commented on Jan 7, 2026

    @deetz99
    Collaborator
  20. chdivyareddy commented on Feb 9, 2026

    @chdivyareddy
    Collaborator

    Verified in DEV!

    image.png

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

Metadata

Metadata

Labels

Colin EgressNuxt LayersOfficersPriority1Priority2UX Assurancebug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions