Closed Bug 1910431 Opened 7 months ago Closed 3 months ago

Typing date in MM/DD/YYYY format into PDF form fails validation causes error.

Categories

(Firefox :: PDF Viewer, defect, P1)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
134 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 --- wontfix
firefox133 --- wontfix
firefox134 --- verified

People

(Reporter: Steve, Assigned: calixte)

References

Details

Attachments

(1 file)

Steps to reproduce:
Open a PDF form that contains a date field where the expected format is "MM/DD/YYYY".
Example: https://www.uscis.gov/sites/default/files/document/forms/i-9.pdf
Type in a date such as "01/01/1999"
receive error: "Entered date is invalid. Please enter the date as: mm/dd/yyyy"

HOWEVER: If I type the date without slashes (example: "01011999") it will auto correct to "01/01/1999" and be accepted.

Firefox should accept dates in almost any format and accept it as valid.

Also, I wouldn't be surprised if some PDF forms incorrectly expect DD/MM/YYYY but would only accept DD/MM/YYYY, so I would rather err on the side of allowing the user to input invalid data than making them unable to complete the form.

Note: this is Firefox 128.0.3 running on Linux Mint 21.3 x86_64

The validation callback is using util.scand("mmddyyyy", newDate) so with this format no separators are accepted.
In testing in Acrobat, util.scand("mmddyyyy", "01/01/1999") is working correctly, even util.scand("mmddyyyy", "01ab01cde1999fghi") is ok.

Severity: -- → S3
Priority: -- → P3

I was able to reproduce the issue on Win11x64 using FF build 130.0a1. Marking issue as New. If not correct please update. Thank you.
Mozregression could not find a regression but last good build is from 2022-03-23 and first bad build is from 2022-03-24.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
OS: Unspecified → Windows
Hardware: Unspecified → Desktop
Assignee: nobody → cdenizet
Status: NEW → ASSIGNED
Priority: P3 → P1
Version: Firefox 128 → Trunk
No longer depends on: 1928159
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

The patch landed in nightly and beta is affected.
:calixte, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox133 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(cdenizet)
Flags: qe-verify+

Reproduced the initial issue using an old Nightly build from 2024-09-16, verified that using latest Nightly 135.0a1 and latest Beta 134.0b1 builds across platforms (Windows 11, macOS 13 and Ubuntu 22.04) the issues looks fixed, the date can written in the mm/dd/yyyy format without receiving the input invalid error.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: