lousystems.FluentValidation.Extensions
1.0.21
See the version list below for details.
dotnet add package lousystems.FluentValidation.Extensions --version 1.0.21
NuGet\Install-Package lousystems.FluentValidation.Extensions -Version 1.0.21
<PackageReference Include="lousystems.FluentValidation.Extensions" Version="1.0.21" />
<PackageVersion Include="lousystems.FluentValidation.Extensions" Version="1.0.21" />
<PackageReference Include="lousystems.FluentValidation.Extensions" />
paket add lousystems.FluentValidation.Extensions --version 1.0.21
#r "nuget: lousystems.FluentValidation.Extensions, 1.0.21"
#:package lousystems.FluentValidation.Extensions@1.0.21
#addin nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.21
#tool nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.21
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.
1. Validating Network-related Fields
IP Address Validation
Strictly validates IPv4 and IPv6 addresses using the high-performance System.Net.IPAddress parser (no Regex). These extensions distinguish correctly between address families, ensuring an IPv6 address does not pass an IPv4 check and vice versa.
More details can be found in the IP Address Validation Documentation.
public class MyRequestValidator : AbstractValidator<MyRequest>
{
public MyRequestValidator()
{
// Mandatory field
RuleFor(x => x.ServerIp).MustBeIPv4();
}
}
🏗 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 | Versions 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. |
-
net10.0
- FluentValidation (>= 12.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.