Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-403

Accept Discover cards of 17 digits long that start with 6011

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CreditCard
    • Labels:

      Description

      The latest version of the apache-validator 1.5.1 has this regex for the Discover validator:

      /** 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})$"});
      

      It does not accept the Discover cards that start with 6011 and 17 digits long. Would be nice to support it.

      Suggested regex:

      ^(6011\\d{12})$", "^(6011\\d{13})$", "^(64[4-9]\\d{13})$", "^(65\\d{14})$"
      

      Example of the valid card:

      60115564485789458

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tanyaz Tanya
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: