You can dynamically populate a validation script message with a value from a data source. This allows you to ensure users enter the correct value in the field.For example, you can display a custom error message when users enter something in a field that does not match what the script for a field expects. For example, a numeric field, such as Quantity, can have a script attached to it that says the number in this field cannot be greater than 100. If the user enters a number greater than 100, a custom error message appears.<validationScript dp_scriptMessage=”DP Script Message – The quantity must be less than or equal to 100.”/>When you merge the data file with the form design, and you type a number in the Quantity field that is greater than 100, an error dialog box appears.Another example could be to provide custom error messages attached to a script in another language. The data file you point to could have the following defined for script validation:When you merge the data file with the form design, and you type a number in the Quantity field that is greater than 100, an error dialog box in French appears.
Note: To use non-ASCII text (such as accents) in your data file, ensure the file is suitably encoded and the encoding is correctly identified in the XML processing instruction. For example:
•
•
1. For example, type Quantity.
Note:
9.