From 5853b17a0a68dc25da9703f41aae59489360dbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hern=C3=A1ndez=20Alcojor?= Date: Thu, 9 Jun 2016 10:35:02 +0200 Subject: [PATCH] Fix Union Pay credit card regex --- src/lib/isCreditCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/isCreditCard.js b/src/lib/isCreditCard.js index a09290669..d6c549be7 100644 --- a/src/lib/isCreditCard.js +++ b/src/lib/isCreditCard.js @@ -1,7 +1,7 @@ import assertString from './util/assertString'; /* eslint-disable max-len */ -const creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{5,}$/; +const creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/; /* eslint-enable max-len */ export default function isCreditCard(str) {