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
<PackageReference Include="lousystems.FluentValidation.Extensions" Version="1.0.25" />
<PackageVersion Include="lousystems.FluentValidation.Extensions" Version="1.0.25" />
<PackageReference Include="lousystems.FluentValidation.Extensions" />
paket add lousystems.FluentValidation.Extensions --version 1.0.25
#r "nuget: lousystems.FluentValidation.Extensions, 1.0.25"
#:package lousystems.FluentValidation.Extensions@1.0.25
#addin nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.25
#tool nuget:?package=lousystems.FluentValidation.Extensions&version=1.0.25
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. 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 | 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.