setCountryBBANValidation function

bool setCountryBBANValidation(
  1. String country,
  2. bool func(
    1. String
    )
)

Set custom BBAN validation function for country.

If bbanValidationFunc already exists for the corresponding country, it will be overwritten.

Implementation

bool setCountryBBANValidation(String country, bool Function(String) func) {
  if (countrySpecs[country] == null) {
    return false;
  }

  countrySpecs.update(
      country, (CountrySpec value) => value.copyWith(bbanValidationFunc: func));

  return true;
}