Skip to content

},System.Func{-1,System.Boolean},System.String)} },System.Func{-1,System.Boolean},System.Func{-1,System.String})} },System.Func{-1,System.Boolean},System.Func{-1,System.Boolean,System.String})}

BasePropertyValidation(TViewModel, Expression>, Func, string) constructor

Defined in

Type: BasePropertyValidation Namespace: ReactiveUI.Validation.Reactive.Components Assembly: ReactiveUI.Validation.Reactive.dll

Applies to

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

Overloads

  1. public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, string message)

  2. public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, Func<TViewModelProperty?, string> message)

  3. public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, Func<TViewModelProperty?, bool, string> messageFunc)

1. Overload

Attributes: [RequiresUnreferencedCode("WhenAnyValue may reference members that could be trimmed in AOT scenarios.")]

public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, string message)

View source

Summary: Initializes a new instance of the BasePropertyValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression>ViewModel property.
isValidFuncFuncFunc to define if the viewModelProperty is valid or not.
messagestringValidation error message.

2. Overload

Attributes: [RequiresUnreferencedCode("WhenAnyValue may reference members that could be trimmed in AOT scenarios.")]

public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, Func<TViewModelProperty?, string> message)

View source

Summary: Initializes a new instance of the BasePropertyValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression>ViewModel property.
isValidFuncFuncFunc to define if the viewModelProperty is valid or not.
messageFuncFunc to define the validation error message based on the viewModelProperty value.

3. Overload

Attributes: [RequiresUnreferencedCode("WhenAnyValue may reference members that could be trimmed in AOT scenarios.")]

public BasePropertyValidation(TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty?>> viewModelProperty, Func<TViewModelProperty?, bool> isValidFunc, Func<TViewModelProperty?, bool, string> messageFunc)

View source

Summary: Initializes a new instance of the BasePropertyValidation class.

Parameters

NameTypeDescription
viewModelTViewModelViewModel instance.
viewModelPropertyExpression>ViewModel property.
isValidFuncFuncFunc to define if the viewModelProperty is valid or not.
messageFuncFuncFunc to define the validation error message based on the viewModelProperty and isValidFunc values.