bcgov / bcgov/entity

Improve validation on international addresses

Open
#11,489 3 comments 0 reactions 0 assignees View on GitHub
bug ENTITY - DO NOT USE Priority2 UX Assurance
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

### **Describe the bug in current situation**
Ops ticket #540 identified an entities issue with benefit company incorporation. Client tried to enter an invalid address for their director.
- When selected "Denmark" as country, Region field says optional, but **was requiring a value**
- There was no frontend validation explaining the correct behavior when filling the fields - Error triggered upon submission (from API validation?)
- Error message (frontend or backend) should show something meaningful to the user like the name of the Person(director in this case) that has invalid data

They entered the address like this and it didn't work:
![image.png](https://images.zenhubusercontent.com/5d49cdec9547713e57d6cd4a/39231989-0c79-44ec-9b7f-1742727da196)
It finally worked when they entered it like this, but it was not clear.
![image.png](https://images.zenhubusercontent.com/5d49cdec9547713e57d6cd4a/6b18ba22-b528-4ac0-abc2-0a94299a224d)

### **Impact of this bug**
Prevents clients from completing incorporation
Confusing error message prevents them from getting help

### **Chance of Occurring (high/medium/low/very low)**
Medium, not a lot of people with international addresses (not sure if this occurs with just Denmark, or international

### **Steps to Reproduce**
1. start to incorporate a numbered BEN
2. Add a director, and give the director an address in Denmark like this:
![image.png](https://images.zenhubusercontent.com/5d49cdec9547713e57d6cd4a/e6b549bc-02f2-40d0-a0c8-c945d96281ef)
3. See no validation errors in the fields
4. finish the rest of the filing, and attempt to file and pay
5. See error message after clicking file and pay, vague error message

### **Expected behavior**
1. start to incorporate a numbered BEN
2. Add a director, and give the director an address in Denmark like this:
![image.png](https://images.zenhubusercontent.com/5d49cdec9547713e57d6cd4a/e6b549bc-02f2-40d0-a0c8-c945d96281ef)
3. See validation errors / explain how to correctly enter this address
4. finish the rest of the filing, and attempt to file and pay
5. pay successfully, because the data validation was clear upfront and issues were resolved.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reproduction steps for a numbered BEN and a director's Danish address, then trace where the address fields are validated in the frontend and API. Done means invalid input is explained before filing and payment, the error identifies the affected director, and a valid address can complete filing successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, javascript
Domain
api, backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.