This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-validator.git
The following commit(s) were added to refs/heads/master by this push: new 6004181 VALIDATOR-408 DISCOVER Card Validation Patterns 6004181 is described below commit 600418191ca3ff3263b327877d619c8c60a36d38 Author: Sebb <s...@apache.org> AuthorDate: Tue Jul 28 12:34:01 2020 +0100 VALIDATOR-408 DISCOVER Card Validation Patterns --- src/changes/changes.xml | 3 +++ .../org/apache/commons/validator/routines/CreditCardValidator.java | 1 + 2 files changed, 4 insertions(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 1326489..9a4176b 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -99,6 +99,9 @@ Apache Commons Validator. For the current list of dependencies, please see http://commons.apache.org/validator/dependencies.html "> + <action issue="VALIDATOR-408" type="fix" dev="sebb" due-to="Raj Vaida"> + DISCOVER Card Validation Patterns + </action> <action issue="VALIDATOR-472" type="fix" dev="sebb"> UrlValidator should not be more lax than java.net.URI </action> diff --git a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java index 1f33c1e..f8fed98 100644 --- a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java @@ -237,6 +237,7 @@ public class CreditCardValidator implements Serializable { * 644xxx - 65xxxx (16) <br> */ private static final RegexValidator DISCOVER_REGEX = new RegexValidator(new String[] {"^(6011\\d{12})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"}); +// private static final RegexValidator DISCOVER_REGEX = new RegexValidator(new String[] {"^(6011\\d{12})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$", "^(62[2-8]\\d{13})$"}); /** Discover Card Validator */ public static final CodeValidator DISCOVER_VALIDATOR = new CodeValidator(DISCOVER_REGEX, LUHN_VALIDATOR);