FormErrorCollection.GetErrors method (FormErrorType)
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
An empty array is returned if there are no errors in the collection of the specified type.
This member 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.
This type or member can be accessed from code running in forms opened in Microsoft InfoPath Filler or in a Web browser.
In the following example, the GetErrors method of the FormErrorCollection class is used to get all errors of type FormErrorType.UserDefined from the form's errors collection. Then the Name property of the FormError class is used to display their names.