Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17835 Show business lookup error for invalid name change entity types #713

Merged
merged 10 commits into from
Sep 29, 2023

Conversation

leodube-aot
Copy link
Collaborator

@leodube-aot leodube-aot commented Sep 27, 2023

Issue #: /bcgov/entity#17835

Description of changes:

  • Show business lookup error for invalid name change entity types
  • This includes solution for 17952

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

@@ -59,7 +59,7 @@ export default class BusinessFetch extends Vue {
private validate (): boolean {
if (!this.searchField) {
this.errorMessages = ['Required field']
} else if (!/^(A|BC|C|CP|FM|LLC|LP|S|XCP|XL|XP|XS)( |)\d{7}$/i.test(this.searchField)) {
} else if (!/^(A|BC|C|CP|FM|LLC|LP|PA|PAR|S|XCP|XL|XP|XS)( |)\d{7}$/i.test(this.searchField)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am just going to resolve 17952 at the same time as this ticket. This change, plus Vysakh's ticket were all that was needed.

Side note: Would it be valuable to come up with a generic solution here? For example: changing this regex to just check the generic format of having a 1-3 letter code followed by 7 digits, rather than checking the codes explicitly? Otherwise we will have to remember to update this specific section of code whenever a legal type code is added or changed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a really good idea.

It would also be good to display a useful error message if the format is invalid.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call, I'll run the idea past UX

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the regex, just waiting to hear back from UX on the wording of the error message.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This all looks good to me.

When you hear back, if everything is OK, merge away.

Copy link
Collaborator

@JazzarKarim JazzarKarim left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@leodube-aot
Copy link
Collaborator Author

/gcbrun

@bcgov bcgov deleted a comment from bcregistry-sre Sep 29, 2023
@bcgov bcgov deleted a comment from bcregistry-sre Sep 29, 2023
Copy link
Collaborator

@severinbeauvais severinbeauvais left a comment

Choose a reason for hiding this comment

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

Lots of little "tactical" changes... Looks great!

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://namerequest-dev--pr-713-c5l2iich.web.app

@bcgov bcgov deleted a comment from bcregistry-sre Sep 29, 2023
@leodube-aot leodube-aot merged commit 0b6d40c into bcgov:main Sep 29, 2023
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.

4 participants