Class BasePropertyValidation<TViewModel>
- Namespace
- ReactiveUI.Validation.Components
- Assembly
- ReactiveUI.Validation.dll
Base class for items which are used to build a Validation
public abstract class BasePropertyValidation<TViewModel> : ReactiveObject, IDisposable, IPropertyValidationComponent, IValidationComponent, IValidatesProperties
Type Parameters
TViewModel
- Inheritance
-
BasePropertyValidation<TViewModel>
- Implements
- Derived
- Extension Methods
Constructors
BasePropertyValidation()
Initializes a new instance of the BasePropertyValidation<TViewModel> class. Subscribe to the valid subject so we can assign the validity.
Properties
IsValid
Gets a value indicating whether the validation is currently valid or not.
Property Value
Properties
Gets the properties associated with this validation component.
Property Value
PropertyCount
Gets the total number of properties referenced.
Property Value
Text
Gets the current (optional) validation message.
Property Value
ValidationStatusChange
Gets the public mechanism indicating that the validation state has changed.
Property Value
Methods
AddProperty<TProp>(Expression<Func<TViewModel, TProp>>)
Adds a property to the list of this which this validation is associated with.
Parameters
property
Expression<Func<TViewModel, TProp>>ViewModel property.
Type Parameters
TProp
Any type.
ContainsPropertyName(string, bool)
Determine if a property name is actually contained within this.
Parameters
propertyName
stringViewModel property name.
exclusively
boolIndicates if the property to find is unique.
Returns
- bool
Returns true if it contains the property, otherwise false.
Dispose()
Dispose(bool)
Disposes of the managed resources.
Parameters
GetValidationChangeObservable()
Get the validation change observable, implemented by concrete classes.
Returns
- IObservable<IValidation
State > Returns the IValidation
State collection.