Copy link to clipboard
Copied
Hola.
Necesito validar en un campo de texto de un formulario que no permita introducir ni espacios ni - u otros caracteres especiales. Solo letras y números sin separarlos.
Copy link to clipboard
Copied
You can use something like this as the field's custom Keystroke script:
event.rc = /^[a-z\d]*$/i.test(event.change);
if (!event.rc) app.alert("You may only enter letters and numbers in this field.");
Copy link to clipboard
Copied
You can check in the properties of the field, In the validate tab, you can add a script to verify input.
Look at Solved: How to Format text field to alpha only - Adobe Support Community - 9520642
Copy link to clipboard
Copied
Thank you but it didn't work. I need to validate de text in a adobe acrobat form field and when you use a " " or "-" it must give an error. I used de field format "OOOOOO" but it give a general error and I want to have my own text of error
Copy link to clipboard
Copied
You can use something like this as the field's custom Keystroke script:
event.rc = /^[a-z\d]*$/i.test(event.change);
if (!event.rc) app.alert("You may only enter letters and numbers in this field.");
Copy link to clipboard
Copied
Perfect!!! Thank you
Find more inspiration, events, and resources on the new Adobe Community
Explore Now