skwasjer / IbanNet

C# .NET IBAN validator, parser, builder and generator
Apache License 2.0
119 stars 31 forks source link

Add a RejectCountryRule as the direct counterpart of AcceptCountryRule #163

Closed skwasjer closed 10 months ago

skwasjer commented 10 months ago

Is your feature request related to a problem? Please describe. An easy to use way to reject specific countries.

Describe the solution you'd like IbanNet provides an AcceptCountryRule to explicitly limit accepted countries. It would be nice to be able to do the exact opposite and be able to explicitly reject specific countries.

Describe alternatives you've considered

  1. Build my own rule in my own application
  2. Limit the registry by building a new IbanRegistry, by adding a filtered SwiftRegistryProvider (eg. new SwiftRegistryProvider().Where(x => x.CountryCode != ..).

Additional context N/A