Class ValidationContext
- Namespace
- ReactiveUI.Validation.Contexts
- Assembly
- ReactiveUI.Validation.dll
Core interface which all validation components must implement.
public class ValidationContext : ReactiveObject, IValidationContext, IValidationComponent, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger, ICancelable, IDisposable
- Inheritance
-
Validation
Context
- Implements
-
ICancelable
- Extension Methods
Remarks
Contains all of the IValidation
Constructors
ValidationContext(IScheduler?)
Initializes a new instance of the Validation
Parameters
scheduler
ISchedulerOptional scheduler to use for the properties. Uses the current thread scheduler by default.
Properties
IsDisposed
Gets a value indicating whether this instance is disposed.
Property Value
- bool
true
if this instance is disposed; otherwise,false
.
IsValid
Gets a value indicating whether the validation is currently valid or not.
Property Value
Text
Gets the current (optional) validation message.
Property Value
Valid
Gets an observable for the Valid state.
Property Value
ValidationStatusChange
Gets the observable for validation state changes.
Property Value
Validations
Gets get the list of validations.
Property Value
Methods
Add(IValidationComponent)
Adds a validation into the validations collection.
Parameters
validation
IValidationComponent Validation component to be added into the collection.
Dispose()
Dispose(bool)
Disposes of the managed resources.
Parameters
GetIsValid()
Returns if the whole context is valid checking all the validations.
Returns
- bool
Returns true if the Validation
Context is valid, otherwise false.
Remove(IValidationComponent)
Removes a validation from the validations collection.
Parameters
validation
IValidationComponent Validation component to be removed from the collection.
RemoveMany(IEnumerable<IValidationComponent>)
Removes many validation components from the validations collection.
Parameters
validations
IEnumerable<IValidationComponent >Validation components to be removed from the collection.