INotifyDataErrorInfo Interface (System.ComponentModel)

Cambia visualizzazione:
ScriptFree
.NET Framework Class Library
INotifyDataErrorInfo Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
Syntax

Visual Basic

Public Interface INotifyDataErrorInfo
C#

public interface INotifyDataErrorInfo
Visual C++

public interface class INotifyDataErrorInfo
F#

type INotifyDataErrorInfo =  interface end

The INotifyDataErrorInfo type exposes the following members.

Properties

  Name Description
Public property Supported by Portable Class Library HasErrors Gets a value that indicates whether the entity has validation errors.
Top
Methods

  Name Description
Public method Supported by Portable Class Library GetErrors Gets the validation errors for a specified property or for the entire entity.
Top
Events

  Name Description
Public event Supported by Portable Class Library ErrorsChanged Occurs when the validation errors have changed for a property or for the entire entity.
Top
Remarks

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.

Version Information

.NET Framework

Supported in: 4.5

Portable Class Library

Supported in: Portable Class Library
Platforms

Windows 8 Release Preview, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 SP2, Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also

Reference