ReactiveValidation 2.0.3

dotnet add package ReactiveValidation --version 2.0.3
NuGet\Install-Package ReactiveValidation -Version 2.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ReactiveValidation" Version="2.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ReactiveValidation --version 2.0.3
#r "nuget: ReactiveValidation, 2.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ReactiveValidation as a Cake Addin
#addin nuget:?package=ReactiveValidation&version=2.0.3

// Install ReactiveValidation as a Cake Tool
#tool nuget:?package=ReactiveValidation&version=2.0.3

ReactiveValidation

A small validation library for WPF and Avalonia which uses a fluent interface and allows display messages near controls in GUI with MVVM. Inspired FluentValidation by Jeremy Skinner.

Sample

public class CarViewModel : ValidatableObject
{
    public CarViewModel()
    {
        Validator = GetValidator();
    }

    private IObjectValidator GetValidator()
    {
        var builder = new ValidationBuilder<CarViewModel>();

        builder.RuleFor(vm => vm.Make).NotEmpty();
        builder.RuleFor(vm => vm.Model).NotEmpty().WithMessage("Please specify a car model");
        builder.RuleFor(vm => vm.Mileage).GreaterThan(0).When(model => model.HasMileage);
        builder.RuleFor(vm => vm.Vin).Must(BeAValidVin).WithMessage("Please specify a valid VIN");
        builder.RuleFor(vm => vm.Description).Length(10, 100);

        return builder.Build(this);
    }

    private bool BeAValidVin(string vin)
    {
        // Custom vin validating logic goes here.
    }

    // Properties with realization INotifyPropertyChanged goes here.
}

WPF

Avalonia

Documentation

About all features you can read in the documentation.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ReactiveValidation:

Package Downloads
ReactiveValidation.Avalonia

A small validation library for WPF and Avalonia that uses a fluent interface and allows display messages near controls in GUI with MVVM

ReactiveValidation.Wpf

A small validation library for WPF and Avalonia that uses a fluent interface and allows display messages near controls in GUI with MVVM

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.3 894 7/15/2023
2.0.3-pre 218 3/1/2023
2.0.2 1,287 10/11/2022
2.0.1 959 7/28/2022
2.0.0-pre 197 7/19/2022
1.0.7 946 9/26/2020
1.0.5 1,655 7/10/2018
1.0.4 874 6/27/2018
1.0.3 881 6/16/2018
1.0.2 1,032 5/13/2018
1.0.1 874 5/4/2018
1.0.0 875 5/2/2018

Changelog (from 2.0.2 version):
- Added Throttle settings (delay before execute validation)

New features (from 1.x.x versions):
- Multitargeting (+netstandart2.0, +netcore3.1), upgraded from net4.5 to net4.6.1
- Supported Avalonia
- Property cascade mode (https://github.com/Karnah/ReactiveValidation/wiki/Property-cascade-mode)
- Async validation support (https://github.com/Karnah/ReactiveValidation/wiki/Async-validation)
- Transforming property value support (if property string, it's possible to create validation rules for int/long etc.) (https://github.com/Karnah/ReactiveValidation/wiki/Property-value-transforming)
- Overriding default brushes (https://github.com/Karnah/ReactiveValidation/wiki/WPF.-Error-templates)
- Separate class for rules + validator factory (https://github.com/Karnah/ReactiveValidation/wiki/Separate-validation-classes-and-validator-factory)
- Better work with localization and resources (https://github.com/Karnah/ReactiveValidation/wiki/Localization)
- Nullable reference support
- Better documentation support
- A lot of small fixes and refactoring