Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

INotifyDataErrorInfo.GetErrors Method

.NET Framework 4.6 and 4.5

Gets the validation errors for a specified property or for the entire entity.

Namespace:  System.ComponentModel
Assemblies:   System (in System.dll)
  System.ObjectModel (in System.ObjectModel.dll)

'Declaration
Function GetErrors ( _
	propertyName As String _
) As IEnumerable

Parameters

propertyName
Type: System.String

The name of the property to retrieve validation errors for; or Nothing or Empty, to retrieve entity-level errors.

Return Value

Type: System.Collections.IEnumerable
The validation errors for the property or entity.

This method returns an IEnumerable that can change as asynchronous validation rules finish processing. This enables the binding engine to automatically update the user interface validation feedback when errors are added, removed, or modified.

The return value can change to a different IEnumerable, or it can reuse a previously returned IEnumerable and change its contents. Any changes to the return value should raise the ErrorsChanged event, even if the return value implements INotifyCollectionChanged.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft