Skip to content

Commit

Permalink
fix validation for Maestro UK card numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jun 27, 2015
1 parent d270bdc commit f24532a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -67,7 +67,8 @@ class CardSchemeValidator extends ConstraintValidator
'MAESTRO' => array(
'/^(6759[0-9]{2})[0-9]{6,13}$/',
'/^(50[0-9]{4})[0-9]{6,13}$/',
'/^([56-69][0-9]{4})[0-9]{6,13}$/',
'/^5[6-9][0-9]{10,17}$/',
'/^6[0-9]{11,18}$/',
),
// All MasterCard numbers start with the numbers 51 through 55. All have 16 digits.
'MASTERCARD' => array(
Expand Down
Expand Up @@ -90,8 +90,10 @@ public function getValidNumbers()
array('LASER', '6771656738314582216'),
array('MAESTRO', '6759744069209'),
array('MAESTRO', '5020507657408074712'),
array('MAESTRO', '5612559223580173965'),
array('MAESTRO', '6759744069209'),
array('MAESTRO', '6759744069209'),
array('MAESTRO', '6594371785970435599'),
array('MASTERCARD', '5555555555554444'),
array('MASTERCARD', '5105105105105100'),
array('VISA', '4111111111111111'),
Expand Down

0 comments on commit f24532a

Please sign in to comment.