From bcfe431110c2dea6b6a423458b54b0a9cafac330 Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 16 May 2020 22:37:32 +0200 Subject: [PATCH] Fixed that IBANs with inconsistent white spaces got marked as error --- .../src/main/java/net/dankito/banking/util/InputValidator.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/InputValidator.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/InputValidator.kt index df682dde..4d5ae82e 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/InputValidator.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/util/InputValidator.kt @@ -60,8 +60,7 @@ open class InputValidator { open fun isValidIban(stringToTest: String): Boolean { - return IbanPattern.matcher(stringToTest).matches() || - IbanWithSpacesPattern.matcher(stringToTest).matches() + return IbanPattern.matcher(stringToTest.replace(" ", "")).matches() } open fun getInvalidIbanCharacters(string: String): String {