Skip to content

},System.IObservable{-1},System.Func{-1,System.Boolean},System.String)} },System.IObservable{-1},System.Func{-0,-1,System.Boolean},System.String)} },System.IObservable{-1},System.Func{-1,System.Boolean},System.Func{-1,System.String})} },System.IObservable{-1},System.Func{-0,-1,System.Boolean},System.Func{-0,-1,System.String})} },System.IObservable{-1},System.Func{-0,-1,System.Boolean},System.Func{-0,-1,System.Boolean,System.String})} },System.IObservable{ReactiveUI.Validation.States.IValidationState})}

ObservableValidation(TViewModel, Expression>, IObservable, Func, string) constructor

Defined in

Type: ObservableValidation Namespace: ReactiveUI.Validation.Components Assembly: ReactiveUI.Validation.dll

Applies to

net11.0, net11.0-maccatalyst27.2, net11.0-tvos27.2, net11.0-windows10.0.19041, net11.0-android37.0, net11.0-macos27.2, net11.0-ios27.2, net10.0, net10.0-macos26.0, net10.0-android36.0, net10.0-tvos26.0, net10.0-ios26.0, net10.0-maccatalyst26.0, net10.0-windows10.0.19041, net48, net47, net471, net472, net481

Overloads

  1. public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TValue, bool> isValidFunc, string message)

  2. public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, string message)

  3. public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TValue, bool> isValidFunc, Func<TValue, string> messageFunc)

  4. public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, Func<TViewModel, TValue, string> messageFunc)

  5. public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, Func<TViewModel, TValue, bool, string> messageFunc)

  6. public ObservableValidation(Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<IValidationState> observable)

1. Overload

public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TValue, bool> isValidFunc, string message)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.
isValidFuncFunc (opens in a new tab)Func to define if the viewModelProperty is valid or not.
messagestring (opens in a new tab)Validation error message as a constant.

2. Overload

public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, string message)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.
isValidFuncFunc (opens in a new tab)Func to define if the viewModelProperty is valid or not.
messagestring (opens in a new tab)Validation error message as a constant.

3. Overload

public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TValue, bool> isValidFunc, Func<TValue, string> messageFunc)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.
isValidFuncFunc (opens in a new tab)Func to define if the viewModelProperty is valid or not.
messageFuncFunc (opens in a new tab)Func to define the validation error message.

4. Overload

public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, Func<TViewModel, TValue, string> messageFunc)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.
isValidFuncFunc (opens in a new tab)Func to define if the viewModelProperty is valid or not.
messageFuncFunc (opens in a new tab)Func to define the validation error message.

5. Overload

public ObservableValidation(TViewModel viewModel, Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<TValue> observable, Func<TViewModel, TValue, bool> isValidFunc, Func<TViewModel, TValue, bool, string> messageFunc)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.
isValidFuncFunc (opens in a new tab)Func to define if the viewModelProperty is valid or not.
messageFuncFunc (opens in a new tab)Func to define the validation error message.

6. Overload

public ObservableValidation(Expression<Func<TViewModel, TProp>> viewModelProperty, IObservable<IValidationState> observable)

View source (opens in a new tab)

Summary: Initializes a new instance of the ObservableValidation class.

Parameters

NameTypeDescription
viewModelPropertyExpression> (opens in a new tab)ViewModel property.
observableIObservable (opens in a new tab)Observable that updates the view model property validity.