Conversation
- updated some typing
| this.postalCodeRulesEnabled = true | ||
| await Vue.nextTick() // ensure postal code rules are functional before validating | ||
| return this.$refs.addressForm.validate() | ||
| } |
There was a problem hiding this comment.
The problem was that we didn't wait for the postal code component to process its rules (line 139) before we called to validate this form. So, the form didn't know if the postal code was invalid.
You'll be able to test this when I integrate it into Create UI :)
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #32302 by adding a wait mechanism before validation in the BaseAddress component to ensure postal code rules are applied before validation runs. The change also includes improvements to method type annotations, replacing generic any types with specific types like Promise<boolean> and void.
Changes:
- Made the
validate()method async and addedVue.nextTick()to wait for postal code rules to be enabled before validation - Updated return type annotations for
validate(),reset(),resetValidation(), andonCountryChange()methods fromanyto specific types
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue #: bcgov/entity#32302
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).