Finova.Extensions.FluentValidation
1.4.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Finova.Extensions.FluentValidation --version 1.4.0
NuGet\Install-Package Finova.Extensions.FluentValidation -Version 1.4.0
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="Finova.Extensions.FluentValidation" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Finova.Extensions.FluentValidation" Version="1.4.0" />
<PackageReference Include="Finova.Extensions.FluentValidation" />
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 Finova.Extensions.FluentValidation --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Finova.Extensions.FluentValidation, 1.4.0"
#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 Finova.Extensions.FluentValidation@1.4.0
#: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=Finova.Extensions.FluentValidation&version=1.4.0
#tool nuget:?package=Finova.Extensions.FluentValidation&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Finova
<div align="center">
The Offline Financial Validation Toolkit for .NET
IBAN · BIC · Payment Cards · Payment References · VAT · Business Numbers · Securities
100% Offline · Zero Dependencies · Lightning Fast
</div>
✨ Why Finova?
| Feature | Benefit |
|---|---|
| 🆓 Free Forever | MIT License, no API keys, no usage limits, no subscription fees |
| ⚙️ Enterprise Ready | Production-grade validation trusted by financial institutions |
| 🔒 Privacy First | All validations run locally — your data never leaves your servers |
| ⚡ Lightning Fast | Optimized algorithms with zero network latency |
| 🌍 Global Coverage | 70+ countries across 6 continents |
| 🧩 Easy Integration | FluentValidation support, dependency injection ready |
📦 Quick Installation
# Main package
dotnet add package Finova
# FluentValidation integration (optional)
dotnet add package Finova.Extensions.FluentValidation
🚀 Feature Overview
🏦 Banking & Cards
| Validator | Description | Format |
|---|---|---|
| IBAN | International Bank Account Number | BE68 5390 0754 7034 |
| BBAN | Basic Bank Account Number | 539007547034 |
| BIC/SWIFT | Bank Identifier Code | KREDBEBB |
| Payment Card | Credit/Debit card (Visa, MC, Amex, etc.) | 4111 1111 1111 1111 |
| Bank Routing | US ABA, CA Transit Numbers | 021000021 |
📝 Payment References
| Format | Country | Example |
|---|---|---|
| Belgian OGM/VCS | 🇧🇪 Belgium | +++123/4567/89012+++ |
| ISO RF | 🌍 International | RF18 5390 0754 7034 |
| Finnish Viitenumero | 🇫🇮 Finland | 12345 67890 00123 |
| Norwegian KID | 🇳🇴 Norway | 2345678901234 |
| Swedish OCR | 🇸🇪 Sweden | 1234567890128 |
| Swiss QR-Reference | 🇨🇭 Switzerland | 210000000003139471430009017 |
| Slovenian SI12 | 🇸🇮 Slovenia | SI12 1234 5678 901 |
| Danish FIK | 🇩🇰 Denmark | +71<12345678901234+ |
| Italian CBILL | 🇮🇹 Italy | 12345 12345 12345 12345 |
| Portuguese Multibanco | 🇵🇹 Portugal | 12345 123456789 12 |
🏢 Business Numbers
| Validator | Description | Countries |
|---|---|---|
| VAT Number | Value Added Tax ID | All 27 EU countries + UK, CH, NO |
| Enterprise Number | Business registration | Belgium (BCE/KBO), etc. |
| EIN | Employer Identification Number | 🇺🇸 USA |
| LEI | Legal Entity Identifier | 🌍 ISO 17442 worldwide |
🆔 National Identity
| Region | Countries | ID Types |
|---|---|---|
| Western Europe | BE, FR, DE, NL, UK, AT, CH | Belgian NN, French NIR, German Steuer-ID, Dutch BSN, UK NINO |
| Northern Europe | SE, NO, DK, FI, IS | Personnummer, Fødselsnummer, CPR, HETU, Kennitala |
| Southern Europe | IT, ES, PT, GR, TR | Codice Fiscale, DNI/NIE, NIF, AMKA, TC Kimlik |
| Eastern Europe | PL, RO, UA, BG, CZ, HU | PESEL, CNP, RNTRC, EGN, Rodné číslo |
| Microstates | AD, LI, MC, SM, VA | National ID formats |
📊 Securities Identifiers (New in v1.4.0)
| Validator | Description | Format | Example |
|---|---|---|---|
| ISIN | International Securities Identification Number | 2 letters + 9 chars + check digit | US0378331005 (Apple) |
| CUSIP | Committee on Uniform Securities ID | 9 alphanumeric characters | 037833100 |
| SEDOL | Stock Exchange Daily Official List | 7 alphanumeric characters | B0YQ5W0 |
| Currency | ISO 4217 currency code validation | 3 letters | EUR, USD, GBP |
| LEI | Legal Entity Identifier | 20 alphanumeric | 5493001KJTIIGC8Y1R12 |
🌍 Country Support
Europe (51 Countries & Territories)
| Region | Countries |
|---|---|
| Western | 🇧🇪 Belgium, 🇫🇷 France, 🇩🇪 Germany, 🇳🇱 Netherlands, 🇬🇧 UK, 🇦🇹 Austria, 🇨🇭 Switzerland, 🇱🇺 Luxembourg, 🇮🇪 Ireland, 🇲🇨 Monaco, 🇱🇮 Liechtenstein |
| Northern | 🇸🇪 Sweden, 🇳🇴 Norway, 🇩🇰 Denmark, 🇫🇮 Finland, 🇮🇸 Iceland, 🇪🇪 Estonia, 🇱🇻 Latvia, 🇱🇹 Lithuania, 🇫🇴 Faroe Islands, 🇬🇱 Greenland |
| Southern | 🇮🇹 Italy, 🇪🇸 Spain, 🇵🇹 Portugal, 🇬🇷 Greece, 🇲🇹 Malta, 🇨🇾 Cyprus, 🇦🇩 Andorra, 🇸🇲 San Marino, 🇻🇦 Vatican, 🇬🇮 Gibraltar |
| Eastern | 🇵🇱 Poland, 🇨🇿 Czech Republic, 🇸🇰 Slovakia, 🇭🇺 Hungary, 🇷🇴 Romania, 🇧🇬 Bulgaria, 🇸🇮 Slovenia, 🇭🇷 Croatia |
| Balkans | 🇷🇸 Serbia, 🇲🇪 Montenegro, 🇧🇦 Bosnia, 🇲🇰 North Macedonia, 🇦🇱 Albania, 🇽🇰 Kosovo |
| East | 🇺🇦 Ukraine, 🇲🇩 Moldova, 🇧🇾 Belarus, 🇬🇪 Georgia, 🇦🇿 Azerbaijan, 🇹🇷 Turkey |
Global Expansion (v1.4.0)
| Region | Country | Tax ID | Bank Account | Bank Routing |
|---|---|---|---|---|
| North America | 🇺🇸 USA | EIN ✓ | — | ABA Routing ✓ |
| 🇨🇦 Canada | BN ✓ | — | Transit Number ✓ | |
| South America | 🇧🇷 Brazil | CNPJ/CPF ✓ | — | — |
| 🇲🇽 Mexico | RFC ✓ | — | — | |
| 🇦🇷 Argentina | CUIT/CUIL ✓ | — | — | |
| 🇨🇱 Chile | RUT ✓ | — | — | |
| 🇨🇴 Colombia | NIT ✓ | — | — | |
| Asia | 🇨🇳 China | USCC ✓ | — | — |
| 🇯🇵 Japan | Corporate Number ✓ | — | — | |
| 🇮🇳 India | GSTIN/PAN ✓ | — | — | |
| 🇸🇬 Singapore | UEN ✓ | — | — | |
| Southeast Asia | 🇮🇩 Indonesia | NPWP ✓ | — | — |
| 🇲🇾 Malaysia | TIN ✓ | — | — | |
| 🇹🇭 Thailand | TIN ✓ | — | — | |
| 🇻🇳 Vietnam | TIN ✓ | — | — | |
| Oceania | 🇦🇺 Australia | ABN/TFN ✓ | — | BSB ✓ |
🔧 Usage Examples
Basic Validation
using Finova.Core.Iban;
using Finova.Core.PaymentCard;
using Finova.Core.Identifiers;
// IBAN Validation
var ibanService = new IbanService();
var result = ibanService.Validate("BE68 5390 0754 7034");
if (result.IsValid)
{
var details = ibanService.Parse("BE68 5390 0754 7034");
Console.WriteLine($"Country: {details.CountryCode}");
Console.WriteLine($"BBAN: {details.Bban}");
Console.WriteLine($"Check Digits: {details.CheckDigits}");
}
// Payment Card Validation
var cardValidator = new PaymentCardValidator();
var cardResult = cardValidator.Validate("4111111111111111");
if (cardResult.IsValid)
{
var cardDetails = cardValidator.Parse("4111111111111111");
Console.WriteLine($"Brand: {cardDetails.Brand}"); // Visa
}
// ISIN Validation (Securities)
var isinValidator = new IsinValidator();
var isinResult = isinValidator.Validate("US0378331005");
if (isinResult.IsValid)
{
var isinDetails = isinValidator.Parse("US0378331005");
Console.WriteLine($"Country: {isinDetails.CountryCode}"); // US
Console.WriteLine($"NSIN: {isinDetails.Nsin}"); // 037833100
}
Dependency Injection
using Finova.Extensions;
// Register all Finova services
services.AddFinova();
// Or register specific services
services.AddFinovaCore();
services.AddFinovaCountry<BelgiumModule>();
public class PaymentService
{
private readonly IIbanService _ibanService;
private readonly IVatValidator _vatValidator;
public PaymentService(IIbanService ibanService, IVatValidator vatValidator)
{
_ibanService = ibanService;
_vatValidator = vatValidator;
}
public bool ValidatePaymentDetails(string iban, string vatNumber)
{
return _ibanService.Validate(iban).IsValid
&& _vatValidator.Validate(vatNumber).IsValid;
}
}
FluentValidation Integration
using Finova.Extensions.FluentValidation;
public class PaymentRequestValidator : AbstractValidator<PaymentRequest>
{
public PaymentRequestValidator()
{
RuleFor(x => x.Iban)
.IsValidIban()
.WithMessage("Please provide a valid IBAN");
RuleFor(x => x.VatNumber)
.IsValidVat()
.WithMessage("Invalid VAT number format");
RuleFor(x => x.CardNumber)
.IsValidPaymentCard()
.WithMessage("Invalid credit card number");
RuleFor(x => x.NationalId)
.IsValidNationalId("BE")
.WithMessage("Invalid Belgian national ID");
}
}
Country-Specific Validation
using Finova.Countries.Belgium;
using Finova.Countries.UnitedStates;
// Belgian validations
var belgiumIban = new BelgiumIbanValidator();
belgiumIban.Validate("BE68 5390 0754 7034"); // ✓
var belgiumVat = new BelgiumVatValidator();
belgiumVat.Validate("BE0123456789"); // ✓
var belgiumNationalId = new BelgiumNationalIdValidator();
belgiumNationalId.Validate("85.07.30-033.28"); // ✓
// US validations
var usRouting = new UnitedStatesRoutingNumberValidator();
usRouting.Validate("021000021"); // ✓
var usEin = new UnitedStatesEinValidator();
usEin.Validate("12-3456789"); // ✓
📋 Validation Rules Reference
IBAN Structure
| Component | Length | Description |
|---|---|---|
| Country Code | 2 | ISO 3166-1 alpha-2 |
| Check Digits | 2 | Mod 97 validation |
| BBAN | Variable | Country-specific format |
Payment Card Validation
| Brand | Prefix | Length | Algorithm |
|---|---|---|---|
| Visa | 4 | 16 | Luhn |
| Mastercard | 51-55, 2221-2720 | 16 | Luhn |
| American Express | 34, 37 | 15 | Luhn |
| Discover | 6011, 644-649, 65 | 16 | Luhn |
| Diners Club | 36, 38, 300-305 | 14-16 | Luhn |
ISIN Structure
| Component | Position | Description |
|---|---|---|
| Country Code | 1-2 | ISO 3166-1 alpha-2 |
| NSIN | 3-11 | National Security ID |
| Check Digit | 12 | Luhn mod 10 |
📊 Test Coverage
Total Tests: 4,145+
Passing: 100%
Countries Covered: 70+
Validators: 50+
🗺️ Roadmap
| Version | Status | Features |
|---|---|---|
| v1.0.0 | ✅ Released | Core IBAN, BIC, Payment Cards |
| v1.1.0 | ✅ Released | Payment References (BE, FI, NO, SE, CH) |
| v1.2.0 | ✅ Released | VAT validation, Enterprise Numbers |
| v1.3.0 | ✅ Released | National ID (51 European countries) |
| v1.4.0 | 🚀 Current | Global Expansion, Securities (ISIN, CUSIP, SEDOL), Currency |
| v1.5.0 | 📋 Planned | EPC QR Code generation, SEPA XML |
| v1.6.0 | 📋 Planned | Async validation, Batch processing |
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please read our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
🙏 Acknowledgments
- Financial standards: ISO 13616 (IBAN), ISO 9362 (BIC), ISO 6166 (ISIN), ISO 17442 (LEI)
- European Banking Authority for IBAN registry
- GLEIF for LEI standards
- Community contributors
<div align="center">
Made with ❤️ by Florian Di Vrusa
⭐ Star on GitHub · 📦 NuGet Package · 🌐 Website
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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.
-
net10.0
- Finova (>= 1.4.0)
- FluentValidation (>= 12.1.0)
-
net8.0
- Finova (>= 1.4.0)
- FluentValidation (>= 12.1.0)
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.4.18 | 92 | 2/10/2026 |
| 1.4.17 | 90 | 2/9/2026 |
| 1.4.16 | 92 | 2/9/2026 |
| 1.4.15 | 95 | 2/8/2026 |
| 1.4.14 | 95 | 2/8/2026 |
| 1.4.13 | 101 | 2/7/2026 |
| 1.4.12 | 101 | 2/7/2026 |
| 1.4.11 | 106 | 1/22/2026 |
| 1.4.10 | 95 | 1/22/2026 |
| 1.4.9 | 95 | 1/22/2026 |
| 1.4.8 | 96 | 1/15/2026 |
| 1.4.7 | 98 | 1/15/2026 |
| 1.4.6 | 100 | 1/12/2026 |
| 1.4.5 | 97 | 1/11/2026 |
| 1.4.4 | 100 | 1/8/2026 |
| 1.4.3 | 104 | 1/8/2026 |
| 1.4.2 | 101 | 1/6/2026 |
| 1.4.1 | 99 | 1/3/2026 |
| 1.4.0 | 101 | 1/2/2026 |
| 1.4.0-alpha.1 | 228 | 12/18/2025 |
Loading failed