Copy link to clipboard
Copied
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 (ąćńółżź).
Copy link to clipboard
Copied
Not sure why the first code doesn't work, but this does:
event.rc = /^[a-z,0-9]*$/i.test(event.change);
Copy link to clipboard
Copied
Not sure why the first code doesn't work, but this does:
event.rc = /^[a-z,0-9]*$/i.test(event.change);
Copy link to clipboard
Copied
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 🙂