From: Seamus Lee Date: Tue, 13 Sep 2016 22:00:35 +0000 (+1000) Subject: Allow contribution forms to support Mastercard 2bin series X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9466465aa55f559b17d4fdf227bbba4c5956aaa7;p=civicrm-core.git Allow contribution forms to support Mastercard 2bin series --- diff --git a/templates/CRM/Core/BillingBlock.js b/templates/CRM/Core/BillingBlock.js index dec4b6581f..894487b80c 100644 --- a/templates/CRM/Core/BillingBlock.js +++ b/templates/CRM/Core/BillingBlock.js @@ -43,7 +43,7 @@ // Based on http://davidwalsh.name/validate-credit-cards // See also https://en.wikipedia.org/wiki/Credit_card_numbers var card_types = { - 'mastercard': '5[1-5][0-9]{14}', + 'mastercard': '(5[1-5][0-9]{2}|2[3-6][0-9]{2}|22[3-9][0-9]|222[1-9]|27[0-1][0-9]|2720)[0-9]{12}', 'visa': '4(?:[0-9]{12}|[0-9]{15})', 'amex': '3[47][0-9]{13}', 'dinersclub': '3(?:0[0-5][0-9]{11}|[68][0-9]{12})',