You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Tanya (JIRA)" <ji...@apache.org> on 2016/08/25 01:56:20 UTC
[jira] [Updated] (VALIDATOR-403) Accept Discover cards of 17 digits
long that start with 6011
[ https://issues.apache.org/jira/browse/VALIDATOR-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanya updated VALIDATOR-403:
----------------------------
Description:
The latest version of the apache-validator 1.5.1 has this regex for the Discover validator:
{code}
/** Discover Card regular expressions */
private static final RegexValidator DISCOVER_REGEX = new RegexValidator(new String[] {"^(6011\\d{12})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"});
{code}
It does not accept the Discover cards that start with 6011 and 17 digits long. Would be nice to support it.
Suggested regex:
{code}
^(6011\\d{12})$", "^(6011\\d{13})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"
{code}
Example of the valid card:
{quote}
60115564485789458
{quote}
was:
The latest version of the apache-validator 1.5.1 has this regex for the Discover validator:
{code}
/** Discover Card regular expressions */
private static final RegexValidator DISCOVER_REGEX = new RegexValidator(new String[] {"^(6011\\d{12})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"});
{code}
It does not accept the Discover cards that start with 6011 and 17 digits long. Would be nice to support it.
Suggested regex:
{code}
^(6011\d{12})$", "^(6011\\d{13})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"
{code}
Example of the valid card:
{quote}
60115564485789458
{quote}
> Accept Discover cards of 17 digits long that start with 6011
> ------------------------------------------------------------
>
> Key: VALIDATOR-403
> URL: https://issues.apache.org/jira/browse/VALIDATOR-403
> Project: Commons Validator
> Issue Type: Improvement
> Components: Framework
> Reporter: Tanya
> Priority: Minor
> Labels: payment, validator
>
> The latest version of the apache-validator 1.5.1 has this regex for the Discover validator:
> {code}
> /** Discover Card regular expressions */
> private static final RegexValidator DISCOVER_REGEX = new RegexValidator(new String[] {"^(6011\\d{12})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"});
> {code}
> It does not accept the Discover cards that start with 6011 and 17 digits long. Would be nice to support it.
> Suggested regex:
> {code}
> ^(6011\\d{12})$", "^(6011\\d{13})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"
> {code}
> Example of the valid card:
> {quote}
> 60115564485789458
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)