The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

ViewForExtensions.

BindValidationEx<TView, TViewModel, TViewModelProperty>(TView, TViewModel, Expression<Func<TViewModel, TViewModelProperty>>, TextInputLayout, IValidationTextFormatter<string>) Method

Summary

Platform binding to the TextInputLayout.

Syntax

[ExcludeFromCodeCoverage]
[Obsolete("This method is no longer required, BindValidation now supports multiple validations.")]
[SuppressMessage("Design", "CA1801: Parameter unused", Justification = "Used for generic resolution.")]
public static IDisposable BindValidationEx<TView, TViewModel, TViewModelProperty>(this TView view, TViewModel viewModel, Expression<Func<TViewModel, TViewModelProperty>> viewModelProperty, TextInputLayout viewProperty, IValidationTextFormatter<string> formatter = null) 
    where TView : IViewFor<TViewModel> where TViewModel : class, IReactiveObject, IValidatableViewModel

Remarks

Supports multiple validations for the same property.

Attributes

Type Description
ExcludeFromCodeCoverage
ObsoleteAttribute
SuppressMessageAttribute

Type Parameters

Name Description
TView IViewFor of TViewModel.
TViewModel ViewModel type.
TViewModelProperty ViewModel property type.

Parameters

Name Type Description
view TView IViewFor instance.
viewModel TViewModel ViewModel instance. Can be null, used for generic type resolution.
viewModelProperty Expression<Func<TViewModel, TViewModelProperty>> ViewModel property.
viewProperty TextInputLayout View property to bind the validation message.
formatter IValidationTextFormatter<string> Validation formatter. Defaults to SingleLineFormatter. In order to override the global default value, implement IValidationTextFormatter<TOut> and register an instance of IValidationTextFormatter<string> into Splat.Locator.

Return Value

Type Description
IDisposable Returns a IDisposable object.