Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1ad577

Browse filesBrowse files
committed
bug #24900 [Validator] Fix Costa Rica IBAN format (Bozhidar Hristov)
This PR was squashed before being merged into the 2.7 branch (closes #24900). Discussion ---------- [Validator] Fix Costa Rica IBAN format | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | no | License | MIT | Doc PR | no Fix Costa Rica IBAN format: https://bank.codes/iban/structure/costa-rica/ Commits ------- b9b5e18 [Validator] Fix Costa Rica IBAN format
2 parents 4706290 + b9b5e18 commit b1ad577
Copy full SHA for b1ad577

File tree

2 files changed

+4
-3
lines changed
Filter options

2 files changed

+4
-3
lines changed

‎src/Symfony/Component/Validator/Constraints/IbanValidator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Constraints/IbanValidator.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class IbanValidator extends ConstraintValidator
5858
'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland
5959
'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast
6060
'CM' => 'CM\d{2}\d{23}', // Cameron
61-
'CR' => 'CR\d{2}\d{3}\d{14}', // Costa Rica
61+
'CR' => 'CR\d{2}0\d{3}\d{14}', // Costa Rica
6262
'CV' => 'CV\d{2}\d{21}', // Cape Verde
6363
'CY' => 'CY\d{2}\d{3}\d{5}[\dA-Z]{16}', // Cyprus
6464
'CZ' => 'CZ\d{2}\d{20}', // Czech Republic

‎src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function getValidIbans()
135135
array('CV64000300004547069110176'), //Cape Verde
136136
array('FR7630007000110009970004942'), //Central African Republic
137137
array('CG5230011000202151234567890'), //Congo
138-
array('CR0515202001026284066'), //Costa Rica
138+
array('CR05015202001026284066'), //Costa Rica
139139
array('DO28BAGR00000001212453611324'), //Dominican Republic
140140
array('GT82TRAJ01020000001210029690'), //Guatemala
141141
array('IR580540105180021273113007'), //Iran
@@ -253,6 +253,7 @@ public function getIbansWithInvalidFormat()
253253
array('FR76300070001100099700049421'), //Central African Republic
254254
array('CG52300110002021512345678901'), //Congo
255255
array('CR05152020010262840661'), //Costa Rica
256+
array('CR0515202001026284066'), //Costa Rica
256257
array('DO28BAGR000000012124536113241'), //Dominican Republic
257258
array('GT82TRAJ010200000012100296901'), //Guatemala
258259
array('IR5805401051800212731130071'), //Iran
@@ -363,7 +364,7 @@ public function getIbansWithValidFormatButIncorrectChecksum()
363364
array('CV64000300004547069110177'), //Cape Verde
364365
array('FR7630007000110009970004943'), //Central African Republic
365366
array('CG5230011000202151234567891'), //Congo
366-
array('CR0515202001026284067'), //Costa Rica
367+
array('CR96042332432534543564'), //Costa Rica
367368
array('DO28BAGR00000001212453611325'), //Dominican Republic
368369
array('GT82TRAJ01020000001210029691'), //Guatemala
369370
array('IR580540105180021273113008'), //Iran

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.