When the program encounters the invalid node, the method Validation Error is called that displays a message explaining why validation failed. An object of the class Xml Schema Set stores a collection of schemas that an Xml Reader can be validated against.It assigns a new Xml Schema Set object to variable schemas, and calls this object's Add method to add a schema to the collection.Another thing I like to do is to display the validation error message on the form in an otherwise hidden field: The problem with our last solution is that if the user saves a partially filled form, and picks it up at a later time, that error message that popped up is long gone, and the only indication that there is something wrong with the form is the modified field color.
To start, we create a text field and bring up the properties dialog for the field.
Then we select the “Validate” tab to see the validation options: The default is that the field will not get validated.
It can validate an XML document as it reads and parses the document.
In this example, we demonstrate how to activate such validation.
The illustration validates an XML document that the user chooses, either or catelog1against the XML Schema document
You need one schema and two XML files to validate against the schema.
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.
In that case, the previous value of the field is restored, and the user has to enter the data again.