INotifyDataErrorInfo Interface

.NET Framework 4.6 and 4.5

Defines members that data entity classes can implement to provide custom synchronous and asynchronous validation support.

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

'Declaration
Public Interface INotifyDataErrorInfo

The INotifyDataErrorInfo type exposes the following members.

  NameDescription
Public propertySupported by Portable Class LibraryHasErrorsGets a value that indicates whether the entity has validation errors.
Top

  NameDescription
Public methodSupported by Portable Class LibraryGetErrorsGets the validation errors for a specified property or for the entire entity.
Top

  NameDescription
Public eventSupported by Portable Class LibraryErrorsChangedOccurs when the validation errors have changed for a property or for the entire entity.
Top

This interface enables data entity classes to implement custom validation rules and expose validation results asynchronously. This interface also supports custom error objects, multiple errors per property, cross-property errors, and entity-level errors. Cross-property errors are errors that affect multiple properties. You can associate these errors with one or all of the affected properties, or you can treat them as entity-level errors. Entity-level errors are errors that either affect multiple properties or affect the entire entity without affecting a particular property.

.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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft