Share via


INotifyDataErrorInfo.GetErrors(String) Method

Definition

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

public:
 IIterable<Platform::Object ^> ^ GetErrors(Platform::String ^ propertyName);
IIterable<IInspectable> GetErrors(winrt::hstring const& propertyName);
public IEnumerable<object> GetErrors(string propertyName);
function getErrors(propertyName)
Public Function GetErrors (propertyName As String) As IEnumerable(Of Object)

Parameters

propertyName
String

Platform::String

winrt::hstring

The name of the property to retrieve validation errors for. Null or Empty retrieves entity-level errors.

Returns

IIterable<Object>

IEnumerable<Object>

IIterable<Platform::Object>

IIterable<IInspectable>

The validation errors for the property or entity.

Remarks

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.

Applies to