Open Bug 1813620 Opened 2 years ago Updated 1 month ago

Validate the address in the address editor

Categories

(Firefox for Android :: Autofill, enhancement)

Firefox 113
All
Android
enhancement

Tracking

()

Tracking Status
firefox116 --- affected
firefox117 --- affected
firefox122 --- affected
firefox123 --- affected
firefox124 --- affected

People

(Reporter: gl, Unassigned)

References

(Blocks 3 open bugs)

Details

From github: https://github.com/mozilla-mobile/fenix/issues/24965.

We should ensure we are validating the entered address information in the address editor.

Details of acceptance criteria are unclear at time of filing. I would suggest looking at what kind of validation desktop does when adding an address and and get those requirements OK'd with Product. This was considered a lower priority compare to most other requirements at time of filing.

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

Just came across this issue and I think it's related:

  1. In Settings>Autofill>Manage Addresses, save a single address without a ZIP code. (Will not get any errors)
  2. Go to a website to fill in an address (amazon.com for example).
    The address auto-fill prompt will not be triggered unless you add a zip code to your address. So, making the fields mandatory would avoid this situation.

similar bug https://bugzilla.mozilla.org/show_bug.cgi?id=1814164 (maybe dupe?)

Severity: -- → S2
Version: unspecified → Firefox 113
Priority: -- → P2
Assignee: nobody → giorga

(In reply to Gabriel [:gl] (ΦωΦ) from comment #0)

We should ensure we are validating the entered address information in the address editor.

Details of acceptance criteria are unclear at time of filing. I would suggest looking at what kind of validation desktop does when adding an address and and get those requirements OK'd with Product.

Do we have requirements from Product documenting what address validation we need to do? And what error messages or UI we should show for an invalid address?

We should probably be forgiving of address formats because there are so many address exceptions, especially as we expand the address auto-fill support to more countries.

(In reply to Oana Horvath [:ohorvath] from comment #1)

Just came across this issue and I think it's related:

  1. In Settings>Autofill>Manage Addresses, save a single address without a ZIP code. (Will not get any errors)
  2. Go to a website to fill in an address (amazon.com for example).
    The address auto-fill prompt will not be triggered unless you add a zip code to your address. So, making the fields mandatory would avoid this situation.

I don't think a ZIP code should be mandatory, but auto-fill of an address without a ZIP code should still work.

See Also: → 1814164

(In reply to Chris Peterson [:cpeterson] from comment #2)

We should probably be forgiving of address formats because there are so many address exceptions, especially as we expand the address auto-fill support to more countries.

For reference, see the many "Falsehoods Programmers Believe About Postal Addresses":

https://github.com/kdeldycke/awesome-falsehood#postal-addresses

Hi, I can't work on this task because I don't have the requirements from the product.

The first step here is to investigate what kind of validation Desktop does for addresses. Ideally, we are looking for the code that handles this, compiling the requirements, running it by product and maybe myself, and then replicating it.

Status: NEW → ASSIGNED
Type: defect → enhancement

(In reply to Gabriel [:gl] (ΦωΦ) from comment #5)

The first step here is to investigate what kind of validation Desktop does for addresses. Ideally, we are looking for the code that handles this, compiling the requirements, running it by product and maybe myself, and then replicating it.

IIUC, Desktop doesn't do much. Here is where it does some high-level checks (eg, that fields from JSON are strings or numbers) and here is where it "normalizes" fields, but best I can tell that doesn't really include validation. The address editor does have dropdowns for "Country/Region" etc, but I don't think it technically validates anything, it's more that the UI makes it difficult to enter an unexpected country (and the dropdown explicitly includes an empty value, so it's perfectly fine for country to be omitted)

The application-services addresses component doesn't do much in the way of validation either, but also doesn't seem to do that "normalization" - IMO, any such validation and normalization would ideally be done in that component so iOS doesn't need to copy the validation and instead would get it "for free".

Assignee: giorga → nobody
Severity: S2 → N/A
Status: ASSIGNED → NEW
Blocks: 1855085

Clearing Priority so we can reprioritize these bugs relative to our ux-fun-2024 bugs.

Priority: P2 → --
Blocks: 1990862, 1990854
You need to log in before you can comment on or make changes to this bug.