Then we select the “Validate” tab to see the validation options: The default is that the field will not get validated.For numeric fields, there is a convenient way to validate a value range, but we want to select to run a custom validation script.He joined the Information Strategies team in September 1997 and is now an independent consultant.He has written or contributed to "Visual Basic 6 Bible" (IDG Books Worldwide, 1998), "Using Visual Basic 6" (Que), and "Inside VBScript with Active X" (New Riders Press, 1997).
Eric Smith has been a senior consultant with Andersen Consulting, specializing in client/server development using Oracle and Visual Basic, and was senior content developer (Visual Basic) at before it was purchased by Fawcette Technical Publications.
Adobe provided a lot of infrastructure to do that with just a simple script.
Let’s take a look at how to do that with a text field that is only supposed to have a value of either ‘AAAA’ or ‘BBBB’ (yes, I know that this does not make much sense in a real PDF form).
The code first removes all the grouping and separator characters, except for the X, which marks the beginning of an extension.
It was best to convert uppercase X's to lowercase x's for purposes of comparison.