containsCreditCardNumber analyser constraint doesnt support for JCB credit card
- Dominant language
- Scala
- Stars
- 3.6k
- Forks
- 586
- Avg merge
- 13d 13h
- Merged PRs (30d)
- 1
Description
Describe the bug
containsCreditCardNumber analyser constraint doesnt support for JCB credit card
To Reproduce
// Visa, MasterCard, AMEX, Diners Club
val CREDITCARD: Regex = """\b(?:3[47]\d{2}([\ -]?)\d{6}\1\d|(?:(?:4\d|5[1-5]|65)\d{2}|6011)([\ -]?)\d{4}\2\d{4}\2)\d{4}\b""".r
The below two credit card doesnt belong to any of the above CC type. They belong to JCB credit card.
3566002020360505 , 3530111333300000
Expected behavior
It should support JCB credit card as well
Reference
https://github.com/awslabs/deequ/blob/master/src/main/scala/com/amazon/deequ/analyzers/PatternMatch.scala
Contributor guide
Research direction
Start with the containsCreditCardNumber implementation in the referenced src/main/scala/com/amazon/deequ/analyzers/PatternMatch.scala. Check how the current Visa, MasterCard, AMEX, Diners Club, and JCB patterns are handled, then verify that 3566002020360505 and 3530111333300000 are accepted without regressing the existing examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100