|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a DataDOMEvent object.
If the ReturnStatus property is set to False, the changes to the XML Document Object Model (DOM) node are not accepted and the data validation event fails. If set to True, no data validation error has occurred and the data validation event is successful.
Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
In the following example, the ReturnStatus property of the DataDOMEvent object is used to indicate that the data validation event was not successful. The code also uses the ReturnMessage property of the DataDOMEvent object to display a message to the user.