FormError class
Represents an error in the FormErrorCollection of a form.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
Each FormError object in an InfoPath form is associated with a node in the form's underlying XML document. When data validation fails for a particular node, InfoPath creates a FormError object and places it in the FormErrorCollection associated with the form.
There are three types of data validation errors that can occur in an InfoPath form. They can be determined using the FormErrorType property of the FormError class:
FormErrorType.SchemaValidation Data validation failed as a result of an XML Schema–defined constraint.
FormErrorType.SystemGenerated Data validation failed as a result of constraints defined in the form definition (.xsf) file or as a result of form code calling the ReportError() method of the XmlValidatingEventArgs class.
FormErrorType.UserDefined Data validation failed as a result of a custom error defined using the Add method of the FormErrorsCollection class.