Skip to main content
Inspiring
November 7, 2023
Answered

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

  • November 7, 2023
  • 1 reply
  • 718 views

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 (ąćńółżź).

This topic has been closed for replies.
Correct answer try67

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

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

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 7, 2023

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

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

Inspiring
November 7, 2023

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 🙂