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

Formatting and validation not working as expected #15523

Closed
MallRoy opened this issue Sep 29, 2022 · 4 comments · Fixed by #15527
Closed

Formatting and validation not working as expected #15523

MallRoy opened this issue Sep 29, 2022 · 4 comments · Fixed by #15527
Assignees
Labels

Comments

@MallRoy
Copy link

MallRoy commented Sep 29, 2022

Link to PDF file here:
3c4347e5-f117-48af-9349-43e9f72ea811.pdf

Configuration:

  • Web browser and its version: Chrome 105.0.5195.127 (Official Build) (64-bit)
  • Operating system and its version: Windows 10
  • PDF.js version: 3.0.142
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Load the pdf and type the ABN value.
  2. formatting and invalid value alert is not thrown

What is the expected behavior?
image

What went wrong?
image
image

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): https://mozilla.github.io/pdf.js/legacy/web/viewer.html

@MallRoy
Copy link
Author

MallRoy commented Sep 29, 2022

In console reference error is thrown from the scripting manager
image

@calixteman
Copy link
Contributor

I didn't find any documentation about AFExactMatch but if I understand correctly how it's used, it should take 2 arguments: an array of regex and a string. And I guess that if at least one of the regex is exactly matching the string then it returns true else false.

@calixteman calixteman self-assigned this Sep 29, 2022
@Snuffleupagus
Copy link
Collaborator

It's really annoying that Adobe-software is using completely unofficial/undocumented scripting features like this :-(

Searching through GitHub seem to bring up a number of (identical?) implementations that could probably serve as help/inspiration here: https://github.com/search?q=AFExactMatch&type=code

@calixteman calixteman linked a pull request Sep 30, 2022 that will close this issue
@MallRoy
Copy link
Author

MallRoy commented Sep 30, 2022

image
On page 4 if we type two letters (like WA) in State/territory it prints undefined. If the validation is not satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants