lousystems.FluentValidation.Extensions 1.0.25

dotnet add package lousystems.FluentValidation.Extensions --version 1.0.25
                    
NuGet\Install-Package lousystems.FluentValidation.Extensions -Version 1.0.25
                    
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="lousystems.FluentValidation.Extensions" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="lousystems.FluentValidation.Extensions" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="lousystems.FluentValidation.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add lousystems.FluentValidation.Extensions --version 1.0.25
                    
#r "nuget: lousystems.FluentValidation.Extensions, 1.0.25"
                    
#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.
#:package lousystems.FluentValidation.Extensions@1.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.25
                    
Install as a Cake Tool

Build & Tests

lousystems.FluentValidation.Extensions

A collection of lightweight, reusable validation extensions for FluentValidation. Designed to simplify complex business rules and maintain clean, readable validators in modern .NET applications.


🛠 Features & Usage

This library extends IRuleBuilder to provide specialized validation logic out of the box.

IP Address Validation

Strictly validates IPv4 and IPv6 addresses. More details can be found in the Net Documentation.

public class MyRequestValidator : AbstractValidator<MyRequest>
{
    public MyRequestValidator()
    {
        // Mandatory field
        RuleFor(x => x.ServerIp).MustBeIPv4();
    }
}

URL Validation

Validates absolute and relative URLs. More details can be found in the Net Documentation.

2. Security & Identity Validation

JWT Validation

Performs structural validation of JSON Web Tokens (JWT). More details can be found in the Security & Identity Validation Documentation.

NATS NKey Validation

Validates NATS NKeys ensuring correct prefixes and lengths. More details can be found in the Security & Identity Validation Documentation

🏗 Technical Specifications

  • Target Frameworks: .NET 10.0 (LTS).
  • Dependency: FluentValidation (>= 12.0.0).
  • Native AOT Ready: This library does not use reflection at runtime and is fully compatible with Native AOT (Ahead-of-Time) compilation for high-performance cloud-native workloads.

⚖ License

This project is licensed under the MIT License. See the LICENSE file for more information.

🤝 Contributing

Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request on our GitHub Repository.


Technical Implementation Note

When using the IfNotNull variants, the library handles the internal state by wrapping rules in a When condition. This keeps your validator code clean while ensuring strict type safety and null-handling.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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.