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

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • CreditCard

    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

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

            Dates

              Created:
              Updated:
              Resolved: