# INotifyDataErrorInfo

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-system/component_model/trait-inotifydataerrorinfo/

**trait** · [`ferroui-system`](/docs/0.5.0/api/ferroui-system/) · v0.5.0

```rust
trait INotifyDataErrorInfo
```

Lets a model object report the validation errors of its properties, synchronously or
asynchronously (`System.ComponentModel.INotifyDataErrorInfo`).

The errors are untyped, as .NET's `IEnumerable` of errors is: a message is a `String`, and
anything else is the value the model reports. A reader picks the kinds it shows with
`downcast_ref` (`OfType<string>()`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/component_model/i_notify_data_error_info.rs#L12)

## Members

- [`has_errors`](#function-has_errors)
- [`get_errors`](#function-get_errors)
- [`errors_changed`](#function-errors_changed)

<a id="function-has_errors"></a>

### has_errors

```rust
fn has_errors(self: &Self) -> bool
```

Whether the object has validation errors (`HasErrors`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/component_model/i_notify_data_error_info.rs#L14)

<a id="function-get_errors"></a>

### get_errors

```rust
fn get_errors(self: &Self, property_name: Option<&str>) -> Vec<Rc<dyn Any>>
```

The validation errors of the property named `property_name`, or the errors of the whole
object when it is `None` or empty (`GetErrors(string?)`); empty when there are none.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/component_model/i_notify_data_error_info.rs#L18)

<a id="function-errors_changed"></a>

### errors_changed

```rust
fn errors_changed(self: &Self) -> &Event<DataErrorsChangedEventArgs>
```

The event raised when the validation errors of a property, or of the whole object, have
changed (`ErrorsChanged`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/component_model/i_notify_data_error_info.rs#L22)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
