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

[Validator] Fix IbanValidator for ukrainian IBANs #23619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Validator] Fix IbanValidator for ukrainian IBANs
The ukrainian bank identifier consists of six digits and not letters.
Also fix the broken links to the current SWIFT IBAN registry pdf.
  • Loading branch information
paroe committed Jul 21, 2017
commit a681f17468197c805114d31a70a6ef60a046c071
4 changes: 2 additions & 2 deletions 4 src/Symfony/Component/Validator/Constraints/IbanValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class IbanValidator extends ConstraintValidator
* a BBAN (Basic Bank Account Number) which has a fixed length per country and,
* included within it, a bank identifier with a fixed position and a fixed length per country
*
* @see http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf
* @see https://www.swift.com/sites/default/files/resources/iban_registry.pdf
*
* @var array
*/
Expand Down Expand Up @@ -130,7 +130,7 @@ class IbanValidator extends ConstraintValidator
'TL' => 'TL\d{2}\d{3}\d{14}\d{2}', // Timor-Leste
'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia
'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey
'UA' => 'UA\d{2}[A-Z]{6}[\dA-Z]{19}', // Ukraine
'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine
'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British
'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands
'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getValidIbans()

//Extended country list
//http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html
// http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf
// https://www.swift.com/sites/default/files/resources/iban_registry.pdf
array('AO06000600000100037131174'), //Angola
array('AZ21NABZ00000000137010001944'), //Azerbaijan
array('BH29BMAG1299123456BH00'), //Bahrain
Expand Down Expand Up @@ -156,6 +156,7 @@ public function getValidIbans()
array('TL380080012345678910157'), //Timor-Leste
array('TN5914207207100707129648'), //Tunisia
array('TR330006100519786457841326'), //Turkey
array('UA213223130000026007233566001'), //Ukraine
array('AE260211000000230064016'), //United Arab Emirates
);
}
Expand Down Expand Up @@ -268,6 +269,7 @@ public function getIbansWithInvalidFormat()
array('TL3800800123456789101571'), //Timor-Leste
array('TN59142072071007071296481'), //Tunisia
array('TR3300061005197864578413261'), //Turkey
array('UA21AAAA1300000260072335660012'), //Ukraine
array('AE2602110000002300640161'), //United Arab Emirates
);
}
Expand Down Expand Up @@ -377,6 +379,7 @@ public function getIbansWithValidFormatButIncorrectChecksum()
array('TL380080012345678910158'), //Timor-Leste
array('TN5914207207100707129649'), //Tunisia
array('TR330006100519786457841327'), //Turkey
array('UA213223130000026007233566002'), //Ukraine
array('AE260211000000230064017'), //United Arab Emirates
);
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.