Repository: joke2k/faker

Issue:
too long iban generated for pl-PL locale
* Faker version: 9.8.2
* OS: MacOs 12.0.1

IBANs generated for pl_PL locales are 30 characters long. This is too many. Valid PL IBAN should have 28 characters (including country code).

### Steps to reproduce
Generate a Polish IBAN with:
```
from faker import Faker
  fake=Faker('pl-PL')
  print(fake.iban())
```
Copy paste generated string into IBAN Validator at https://www.ibancalculator.com/
### Expected behavior

IBAN should have the correct length and checksum

### Actual behavior

There is an error message that IBAN have too many characters:
"This IBAN cannot be correct because of its length. A Polish IBAN always contains exactly 28 digits and letters ("PL", a 2-digit checksum, and the 24-digit national account number, whose first 8 digits determine the bank and branch). The IBAN you entered is 30 characters long."

too long iban generated for pl-PL locale
* Faker version: 9.8.2
* OS: MacOs 12.0.1

IBANs generated for pl_PL locales are 30 characters long. This is too many. Valid PL IBAN should have 28 characters (including country code).

### Steps to reproduce
Generate a Polish IBAN with:
```
from faker import Faker
  fake=Faker('pl-PL')
  print(fake.iban())
```
Copy paste generated string into IBAN Validator at https://www.ibancalculator.com/
### Expected behavior

IBAN should have the correct length and checksum

### Actual behavior

There is an error message that IBAN have too many characters:
"This IBAN cannot be correct because of its length. A Polish IBAN always contains exactly 28 digits and letters ("PL", a 2-digit checksum, and the 24-digit national account number, whose first 8 digits determine the bank and branch). The IBAN you entered is 30 characters long."



Discussion:
Thank you for the report @dziczyzna ! Would you have time to submit a Pull Request?
Hi @fcurella I'm afraid I wouldn't. 
Thank you for the report @dziczyzna ! Would you have time to submit a Pull Request?
Hi @fcurella I'm afraid I wouldn't. 

Resolving patch:
diff --git a/faker/providers/bank/pl_PL/__init__.py b/faker/providers/bank/pl_PL/__init__.py
--- a/faker/providers/bank/pl_PL/__init__.py
+++ b/faker/providers/bank/pl_PL/__init__.py
@@ -4,5 +4,5 @@
 class Provider(BankProvider):
     """Implement bank provider for ``pl_PL`` locale."""
 
-    bban_format = "#" * 26
+    bban_format = "#" * 24
     country_code = "PL"


Test patch:
diff --git a/tests/providers/test_bank.py b/tests/providers/test_bank.py
--- a/tests/providers/test_bank.py
+++ b/tests/providers/test_bank.py
@@ -73,14 +73,14 @@ class TestPlPl:
 
     def test_bban(self, faker, num_samples):
         for _ in range(num_samples):
-            assert re.fullmatch(r"\d{26}", faker.bban())
+            assert re.fullmatch(r"\d{24}", faker.bban())
 
     def test_iban(self, faker, num_samples):
         for _ in range(num_samples):
             iban = faker.iban()
             assert is_valid_iban(iban)
             assert iban[:2] == PlPlBankProvider.country_code
-            assert re.fullmatch(r"\d{2}\d{26}", iban[2:])
+            assert re.fullmatch(r"\d{2}\d{24}", iban[2:])
 
 
 class TestEnGb: