As I mentioned before, information is passed to the validation function in the event object, and in the code we see that the member ‘value’ is used to communicate the current value of the field.
So, if the user enters ‘01234’ we should see an error message that would instruct the user about what type of data is valid for this field.There are other ways to highlight the field in question besides changing the text color, the border color or the fill color could be changed instead, or in addition, just make sure that you are not making the form impossible to read.To learn more about the event object, take a look at JS.88.560– make sure to click on the button in the upper left corner to display the navigation pane if it’s not shown automatically.One of the questions I get asked again and again is how to validate a field value in an Acro Form with a custom validation script.Adobe provided a lot of infrastructure to do that with just a simple script.