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

AForm validation rejects valid fields #14306

Closed
cincodenada opened this issue Nov 24, 2021 · 0 comments · Fixed by #14429 or #14430
Closed

AForm validation rejects valid fields #14306

cincodenada opened this issue Nov 24, 2021 · 0 comments · Fixed by #14429 or #14430
Labels

Comments

@cincodenada
Copy link

cincodenada commented Nov 24, 2021

Attach (recommended) or Link to PDF file here:

The PDF itself is semi-sensitive. I'm happy to provide via unsecured channels, just can't quite post it publicly.

Configuration:

  • Web browser and its version: Firefox 94.0.1
  • Operating system and its version: Mac OS 11.6
  • PDF.js version: Tested with 2.11.298 (in above Firefox) and git master (5e2aec7)

What is the expected behavior? (add screenshot)

I should be able to fill AForm-validated fields with valid values:

  • I should be able to type "123-45-6789" into an SSN field
  • I should be able to type "867-5309" into a phone field

What went wrong? (add screenshot)

I got validation errors instead, when trying to insert the dashes. If I try to not insert the dashes, it lets me while editing, but throws an error when leaving the field.
Screen Shot 2021-11-24 at 11 33 53 AM
Screen Shot 2021-11-24 at 11 37 13 AM
Screen Shot 2021-11-24 at 11 38 29 AM
Screen Shot 2021-11-24 at 11 38 44 AM

Additional info

For zip codes, the while-typing validation doesn't limit length - I can type as many numbers as I want, and am only complained at once I exit the field.

I've dug into this and will open a PR shortly with more details, but there are other even stranger quirks around internal deletions/insertions as well.

calixteman added a commit to calixteman/pdf.js that referenced this issue Jan 7, 2022
 - @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue mozilla#14306;
 - add some tests.
calixteman added a commit to calixteman/pdf.js that referenced this issue Jan 8, 2022
 - @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue mozilla#14306;
 - add some tests.
Kafva pushed a commit to Kafva/pdf.js that referenced this issue Jan 20, 2022
 - @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue mozilla#14306;
 - add some tests.
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
 - @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue mozilla#14306;
 - add some tests.
rousek pushed a commit to signosoft/pdf.js that referenced this issue Aug 10, 2022
 - @cincodenada found some errors which are fixed in this patch;
 - it partially fixes issue mozilla#14306;
 - add some tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants