Table of Contents

Interface IValidationContext

Namespace
ReactiveUI.Validation.Contexts
Assembly
ReactiveUI.Validation.dll

Core interface which all validation components must implement.

public interface IValidationContext : IValidationComponent, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger, ICancelable, IDisposable
Inherited Members
Extension Methods

Remarks

Contains all of the IValidationComponent instances applicable to the view model.

Properties

Valid

Gets an observable for the Valid state.

IObservable<bool> Valid { get; }

Property Value

IObservable<bool>

Validations

Gets get the list of validations.

IObservableList<IValidationComponent> Validations { get; }

Property Value

IObservableList<IValidationComponent>

Methods

Add(IValidationComponent)

Adds a validation into the validations collection.

void Add(IValidationComponent validation)

Parameters

validation IValidationComponent

Validation component to be added into the collection.

GetIsValid()

Returns if the whole context is valid checking all the validations.

bool GetIsValid()

Returns

bool

Returns true if the ValidationContext is valid, otherwise false.

Remove(IValidationComponent)

Removes a validation from the validations collection.

void Remove(IValidationComponent validation)

Parameters

validation IValidationComponent

Validation component to be removed from the collection.

RemoveMany(IEnumerable<IValidationComponent>)

Removes many validation components from the validations collection.

void RemoveMany(IEnumerable<IValidationComponent> validations)

Parameters

validations IEnumerable<IValidationComponent>

Validation components to be removed from the collection.