# ValidationRules

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-validationrules/

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

```rust
struct ValidationRules
```

The validation rules of a [`PropertyValidationBehavior`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-propertyvalidationbehavior/): a list of objects that implement
[`IValidationRule`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-ivalidationrule/).

Deviation (DEVIATIONS.md, Behaviors): the reference types the collection as the generic list of
the framework of `IValidationRule<TValue>`; here it is a named list of objects of the class
model (as `ActionCollection` of the interactivity crate), so that markup can add the rules of
a document to it; an object that does not implement the contract is skipped by the validation.

It is a reference object: clones refer to the same collection and compare by identity.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/validation/property_validation_behavior.rs#L32)

## Members

- [`new`](#function-new)
- [`list`](#function-list)

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

### new

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

Creates an empty collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/validation/property_validation_behavior.rs#L36)

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

### list

```rust
fn list(self: &Self) -> &FerroList<Ref<FerroObject>>
```

The list of the collection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/validation/property_validation_behavior.rs#L41)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- `Deref`
- `Debug`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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