XmlValidatingEventArgs class

Provides data for the Validating event of a field or group.

Inheritance hierarchy


Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)


Public MustInherit Class XmlValidatingEventArgs _
    Inherits XmlEventArgs
Dim instance As XmlValidatingEventArgs
public abstract class XmlValidatingEventArgs : XmlEventArgs


The XmlValidatingEventArgs object is passed to the event handler for the Validating event, which occurs after changes to a form's underlying XML document have been accepted but before the Changed event has occurred.

The XmlValidatingEventArgs class is derived from the XmlEventArgs class which provides properties that can be used within the event handler to get information about the data that is being validated in the form's underlying XML document and about the node that is being validated. For example, the XmlEventArgs object provides the Site property which gets a reference to an XPathNavigator object that points to the node being validated in the form's underlying XML document. However, note that the underlying XML document is read-only during the Validating event.

In addition to these properties, the XmlValidatingEventArgs class provides the overloaded ReportError method for adding errors to the FormErrorCollection of the form, and to specify custom error information for errors that occur during the Validating event.

The overloaded ReportError method of the XmlValidatingEventArgs class corresponds to the ReportError method of the DataDOMEvent interface in the Microsoft Office InfoPath 2003 managed code object model.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also


XmlValidatingEventArgs members

Microsoft.Office.InfoPath namespace