FluentValidationLister.Filter 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluentValidationLister.Filter --version 1.0.2
NuGet\Install-Package FluentValidationLister.Filter -Version 1.0.2
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="FluentValidationLister.Filter" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentValidationLister.Filter --version 1.0.2
#r "nuget: FluentValidationLister.Filter, 1.0.2"
#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 FluentValidationLister.Filter as a Cake Addin
#addin nuget:?package=FluentValidationLister.Filter&version=1.0.2

// Install FluentValidationLister.Filter as a Cake Tool
#tool nuget:?package=FluentValidationLister.Filter&version=1.0.2

Installation

  1. Install the NuGet package

  2. In the ConfigureServices method of Startup.cs, include a call to AddFluentValidationFilter instead of AddFluentValidation.

public void ConfigureServices(IServiceCollection services)
{
    ...

    services.AddFluentValidationFilter();
}
  1. In order for ASP.NET to discover your validators, they must be registered with the services collection. You must do this by calling the AddTransient method for each of your validators. Adding all validators in a specified assembly is not supported.
    services.AddFluentValidationFilter();

    services.AddTransient<IValidator<Person>, PersonValidator>();
    // (repeat for every validator)

How to use

For any given endpoint, add the query-string ?validation=1 to the endpoint URL in order to view the validator details, if applicable.

Example output for JSON:

{
  "rules": {
    "foreName": {
      "required": true,
      "length": {
        "min": 2,
        "max": 10
      }
    },
    "address.line1": {
      "required": true
    }
  },
  "messages": {
    "foreName": {
      "required": "'Forename' must not be empty.",
      "length": "'Forename' must be between 2 and 10 characters."
    },
    "address.line1": {
      "required": "'Line1' must not be empty."
    }
  }
}

AJAX validation

For unsupported validators or validators with custom server-side logic, the rule will be presented as "remote" - the field can be validated using an AJAX call to the back-end.

You can validate any particular field by adding the query string validate=fieldName and if the field is not valid, a problem details will be returned including errors only relevant to the specified field.

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 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 96 2/2/2024
1.4.0 1,109 4/30/2022
1.3.0 414 3/13/2022
1.2.2 276 12/24/2021
1.2.1 283 8/6/2021
1.2.0 382 8/1/2021
1.1.2 1,040 10/4/2020
1.1.0 394 8/20/2020
1.0.10 431 8/19/2020
1.0.9 428 8/4/2020
1.0.7 501 2/19/2020
1.0.6 782 12/14/2019
1.0.5 547 12/4/2019
1.0.4 475 11/15/2019
1.0.3 511 11/6/2019
1.0.2 515 11/4/2019
1.0.1 552 10/24/2019
1.0.0 552 10/23/2019

Bug fixes for XML support