Closed SebastienE closed 1 year ago
You need to use a IbanCountry
instance from the IbanRegistry
which contains the pattern/positional information the builder needs.
Iow. smth like:
IbanRegistry.Default.TryGetValue("FR", out IbanCountry country); // Or request IIbanRegistry from DI container
It's now good with the country get from IbanRegistry. Thank you.
Regards, Sébastien
Hello,
I'm trying to build IBAN from Country, Bank, Branch and Account identifiers.
I'm using last version (5.7.1) with the following code :
var country = new IbanCountry("FR"); IbanBuilder b = new IbanBuilder(); b.WithCountry(country); b.WithBankIdentifier(ValideBankIdentifier); b.WithBranchIdentifier(ValideBranchIdentifier); b.WithBankAccountNumber(ValivdeAccountIdentifier); return b.Build();
And the following exception is throw from BbanBuilder.Build() function.
System.InvalidOperationException: The country 'FR' does not define a BBAN pattern. at IbanNet.Builders.BbanBuilder.Build()
Can you please help me.
Best regards, Sébastien