Skip to content

31954 adjust label with country#303

Merged
severinbeauvais merged 3 commits intobcgov:mainfrom
loneil:31954adjustLabelWithCountry
Feb 10, 2026
Merged

31954 adjust label with country#303
severinbeauvais merged 3 commits intobcgov:mainfrom
loneil:31954adjustLabelWithCountry

Conversation

@loneil
Copy link
Collaborator

@loneil loneil commented Feb 10, 2026

Issue #: bcgov/entity#31954

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

@severinbeauvais severinbeauvais changed the title 31954adjust label with country 31954 adjust label with country Feb 10, 2026
Signed-off-by: Lucas <lucasoneil@gmail.com>
@loneil loneil force-pushed the 31954adjustLabelWithCountry branch from a1baec9 to 32405df Compare February 10, 2026 21:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances the BaseAddress component to dynamically adjust the postal code field label based on the selected country. It extracts the logic for determining which countries don't use postal codes into a reusable exported function and uses it to intelligently display "(Optional)" on the postal code label when appropriate.

Changes:

  • Extracted isPostalCodeOptionalForCountry function from the validator to make it reusable
  • Updated BaseAddress component to dynamically show "(Optional)" on postal code label based on country requirements when using the isRequiredPostalCode validator

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/validators/is-required-postal-code.ts Refactored to export isPostalCodeOptionalForCountry function that checks if a country uses postal codes
src/components/base-address/BaseAddress.vue Updated postalCodeLabel getter to use the new function and dynamically determine if postal code is optional based on the selected country

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Lucas <lucasoneil@gmail.com>
Signed-off-by: Lucas <lucasoneil@gmail.com>
@severinbeauvais severinbeauvais marked this pull request as ready for review February 10, 2026 22:04
@severinbeauvais severinbeauvais merged commit 0829bb5 into bcgov:main Feb 10, 2026
4 checks passed
@loneil loneil deleted the 31954adjustLabelWithCountry branch February 11, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants