FormError.FormErrorType property

Office 2013 and later

Gets the type of the FormError object.

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

public abstract FormErrorType FormErrorType { get; }

Property value

Type: Microsoft.Office.InfoPath.FormErrorType
A FormErrorType that specifies the type of error.

There are three types of data validation errors that can occur in an InfoPath form that 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.UserSpecified Data validation failed as a result of a custom error defined using the Add method of the FormErrorsCollection class.

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.

Show: