|InfoPath Developer Reference|
Version Added: InfoPath 2003
The DataDOMEvent object provides a number of properties and a method that can be used within a data validation event to programmatically interact with the data that is being validated and to provide a response if the data is not valid.
The DataDOMEvent object is used to get information about the XML Document Object Model (DOM) node that is being changed, and it also provides a property for getting a reference to a form's underlying XML document. In addition, it provides properties for handling the change in data, including rejecting the change and creating an error message.
For more information about using the DataDOMEvent object, see Responding to form events.
In the following example, the DataDOMEvent object is used to check the value of the node using the Site property. If the data validation fails, the ReportError method is used to create a custom error.