Skip to content

Commit 3d17b16

Browse files
author
Nicolass
committed
fix/validator-bol auto-commit
1 parent 83c0dce commit 3d17b16

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.5] - 2024-07-24
11+
12+
### Fixed
13+
- The length of the Bolivian account was changed from 22 digits to minimum of 10.
14+
1015
## [1.1.4] - 2024-07-17
1116

1217
### Added

src/Bo/BoBankAccount.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getAccountTile(): string
2525

2626
public function isValid(): bool
2727
{
28-
if (preg_match('/^([a-zA-Z]{3})\+([0-9]{22})$/', $this->bank_account_number) !== 1) {
28+
if (preg_match('/^([a-zA-Z]{3})\+([0-9]{10,})$/', $this->bank_account_number) !== 1) {
2929
return false;
3030
}
3131

tests/Bo/BoBankAccountTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ final class BoBankAccountTest extends TestCase
2121
public function testIsValid(): void
2222
{
2323
static::assertFalse((new BoBankAccount(''))->isValid());
24-
static::assertFalse((new BoBankAccount('111111111'))->isValid());
24+
static::assertFalse((new BoBankAccount('WQE+111111111'))->isValid());
2525
static::assertFalse((new BoBankAccount('AAAAA0000'))->isValid());
26-
static::assertFalse((new BoBankAccount('01340946340001361695'))->isValid());
27-
static::assertFalse((new BoBankAccount('AAAAA0000'))->isValid());
28-
static::assertFalse((new BoBankAccount('01050194651194-079423'))->isValid());
29-
static::assertFalse((new BoBankAccount('01050194651194079423 More text?'))->isValid());
30-
static::assertTrue((new BoBankAccount('ASD+1234567891234567891234'))->isValid());
26+
static::assertFalse((new BoBankAccount('ASD+013409'))->isValid());
27+
static::assertFalse((new BoBankAccount('ASD+0105019465114-07'))->isValid());
28+
static::assertFalse((new BoBankAccount('ASD+0105019465119407 More text?'))->isValid());
29+
static::assertTrue((new BoBankAccount('ASD+12345678913423511616125234567'))->isValid());
30+
static::assertTrue((new BoBankAccount('ASD+2345678912'))->isValid());
3131
}
3232

3333
public function testBankName(): void
3434
{
35-
static::assertNull((new BoBankAccount('00050194697194012294'))->getBankName());
35+
static::assertNull((new BoBankAccount('00050194697194'))->getBankName());
3636
}
3737

3838
public function testAccountTile(): void
3939
{
40-
static::assertSame('CCI', (new BoBankAccount('01050194697194012294'))->getAccountTile());
40+
static::assertSame('CCI', (new BoBankAccount('01050194697194'))->getAccountTile());
4141
}
4242
}

0 commit comments

Comments
 (0)