# DataValidationErrors

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-datavalidationerrors/

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

```rust
struct DataValidationErrors
```

A control which displays an error notifier when there is a data
validation error. Provides attached properties to track errors on a
control.

You will probably only want to create instances inside of control
templates. Pseudo-classes (on the control with the errors): `:error`.

An error is an untyped value: the error data of a data validation
error, or the error itself boxed as a `BindingError`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L60)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`errors_property`](#function-errors_property)
- [`has_errors_property`](#function-has_errors_property)
- [`error_converter_property`](#function-error_converter_property)
- [`error_template_property`](#function-error_template_property)
- [`owner_property`](#function-owner_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`owner`](#function-owner)
- [`set_owner`](#function-set_owner)
- [`error_template`](#function-error_template)
- [`set_error_template`](#function-set_error_template)
- [`get_errors`](#function-get_errors)
- [`set_errors`](#function-set_errors)
- [`set_error`](#function-set_error)
- [`clear_errors`](#function-clear_errors)
- [`get_has_errors`](#function-get_has_errors)
- [`get_error_converter`](#function-get_error_converter)
- [`set_error_converter`](#function-set_error_converter)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L65)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<DataValidationErrors>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L65)

<a id="assoc_const-pseudo_classes"></a>

### PSEUDO_CLASSES

```rust
const PSEUDO_CLASSES: PseudoClassesAttribute
```

The pseudoclasses set by the class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L82)

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

### errors_property

```rust
fn errors_property() -> &'static AttachedProperty<Option<Vec<BoxedValue>>>
```

Defines the `DataValidationErrors.Errors` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L85)

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

### has_errors_property

```rust
fn has_errors_property() -> &'static AttachedProperty<bool>
```

Defines the `DataValidationErrors.HasErrors` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L85)

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

### error_converter_property

```rust
fn error_converter_property() -> &'static AttachedProperty<Option<ErrorConverter>>
```

Defines the `DataValidationErrors.ErrorConverter` attached
property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L85)

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

### error_template_property

```rust
fn error_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
```

Defines the `DataValidationErrors.ErrorTemplate` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L85)

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

### owner_property

```rust
fn owner_property() -> &'static DirectProperty<DataValidationErrors, Option<ElementRef<Control>>>
```

Defines the `Owner` property.

Deviation (DEVIATIONS.md, Data validation): the owner is the
control the errors are shown in, an ancestor of this control,
which this control does not own, so the value is an element
reference where the managed property holds the control. The themes make it the `DataContext` of a
part of the template (`DataContext="{TemplateBinding Owner}"`),
which holds the reference as it is.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L85)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L164)

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

### new

```rust
fn new() -> Ref<Self>
```

Initializes a new instance of the `DataValidationErrors` class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L169)

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

### owner

```rust
fn owner(self: &Self) -> Option<Ref<Control>>
```

The control whose errors are displayed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L174)

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

### set_owner

```rust
fn set_owner(self: &Self, value: Option<Ref<Control>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L178)

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

### error_template

```rust
fn error_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```

The data template of the errors.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L210)

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

### set_error_template

```rust
fn set_error_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L214)

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

### get_errors

```rust
fn get_errors(control: &Control) -> Option<Vec<BoxedValue>>
```

Gets the errors of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L239)

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

### set_errors

```rust
fn set_errors(control: &Control, errors: Option<Vec<BoxedValue>>)
```

Sets the errors of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L244)

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

### set_error

```rust
fn set_error(control: &Control, error: Option<&BindingError>)
```

Sets the errors of a control from the error of a binding.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L249)

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

### clear_errors

```rust
fn clear_errors(control: &Control)
```

Clears the errors of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L290)

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

### get_has_errors

```rust
fn get_has_errors(control: &Control) -> bool
```

Whether a control has errors.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L295)

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

### get_error_converter

```rust
fn get_error_converter(control: &Control) -> Option<ErrorConverter>
```

Gets the error converter of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L300)

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

### set_error_converter

```rust
fn set_error_converter(control: &Control, converter: Option<ErrorConverter>)
```

Sets the error converter of a control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/data_validation_errors.rs#L305)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<DataValidationErrors>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

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