Improve validation on international addresses
- 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:

It finally worked when they entered it like this, but it was not clear.

### **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:

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:

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