-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Fix Costa Rica IBAN format #24900
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
Conversation
@@ -57,7 +57,7 @@ class IbanValidator extends ConstraintValidator | |||
'CH' => 'CH\d{2}\d{5}[\dA-Z]{12}', // Switzerland | |||
'CI' => 'CI\d{2}[A-Z]{1}\d{23}', // Ivory Coast | |||
'CM' => 'CM\d{2}\d{23}', // Cameron | |||
'CR' => 'CR\d{2}\d{3}\d{14}', // Costa Rica | |||
'CR' => 'CR\d{2}0\d{3}\d{14}', // Costa Rica |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this is security related, thus needs to be changed on lower branches. I'd prefer the BC variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepting an invalid IBAN is a bug. There's no BC to preserve here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.. this wont lead to crashing behavior. My bad 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://bank.codes/iban/structure/costa-rica/ implies it can be any kind of number btw... not sure in practice it's always 0
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ro0NL https://www.iban.com/calculate-iban.html - this site does not give you ability to choose Reserve Number. It automatically set it 0.
Also wiki says:
CRkk 0bbb cccc cccc cccc cc
0= always zero
b = bank code
c = Account number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ro0NL Ok I leave it like that and point it to 2.7
Thank you @Warxcell. |
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
Fix Costa Rica IBAN format: https://bank.codes/iban/structure/costa-rica/