31954 adjust label with country#303
Merged
severinbeauvais merged 3 commits intobcgov:mainfrom Feb 10, 2026
Merged
Conversation
Signed-off-by: Lucas <lucasoneil@gmail.com>
a1baec9 to
32405df
Compare
There was a problem hiding this comment.
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
isPostalCodeOptionalForCountryfunction 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
isRequiredPostalCodevalidator
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>
severinbeauvais
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).