|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a Errors object.
To delete a specific Error object from the Errors collection, use the Delete method.
|Unlike the Delete method that will only delete errors that were created using the Add method of the Errors collection, the DeleteAll method will delete all errors in the Errors collection, regardless of how they were created.|
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 DeleteAll method of the Errors collection is used to delete all the errors that it contains: