Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
13

PDF How to reject Polish Characters to be typed in a Field

Explorer ,
Nov 07, 2023 Nov 07, 2023

Hello,
How do I discard all special characters in the Polish alphabet (ąćńółżź) in a form field?

I use Custom Keystroke Script:

event.rc = /^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0-9]*$/.test(event.change);

OR

event.rc = /^[\w]*$/.test(event.change);

 

Unfortunately, it still allows to enter these characters (ąćńółżź).

TOPICS
PDF forms
552
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Not sure why the first code doesn't work, but this does:

event.rc = /^[a-z,0-9]*$/i.test(event.change);

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Not sure why the first code doesn't work, but this does:

event.rc = /^[a-z,0-9]*$/i.test(event.change);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023
LATEST

Update - the above scripts, however, work correctly. I tested them in the Foxitreader application and they do not work there, but they work properly in the Acrobat DC. So the cause is a bug in the Foxitreader application.

Thank you for your help 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines