Skip to content

feat(isCreditCard): Fixed regex for Union Pay Credit cards with 81 range#1715

Merged
profnandaa merged 2 commits into
validatorjs:masterfrom
shreyassai123:bug1680
Sep 26, 2021
Merged

feat(isCreditCard): Fixed regex for Union Pay Credit cards with 81 range#1715
profnandaa merged 2 commits into
validatorjs:masterfrom
shreyassai123:bug1680

Conversation

@shreyassai123

@shreyassai123 shreyassai123 commented Aug 21, 2021

Copy link
Copy Markdown
Contributor

Fixes #1680

Implemented regex for Union Pay Cards with 81 range by using the regex: ^(81[0-9]{14,17}))$

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

@codecov

codecov Bot commented Aug 21, 2021

Copy link
Copy Markdown

Codecov Report

Merging #1715 (873b1b8) into master (8c4b3b3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1715   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          101       101           
  Lines         2005      2005           
  Branches       452       452           
=========================================
  Hits          2005      2005           
Impacted Files Coverage Δ
src/lib/isCreditCard.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c4b3b3...873b1b8. Read the comment docs.

@fedeci

fedeci commented Aug 21, 2021

Copy link
Copy Markdown
Contributor

Can you add tests?

@shreyassai123

Copy link
Copy Markdown
Contributor Author

Tests have been added

@tux-tn tux-tn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @shreyassai123 and congrats for your first contribution

@tux-tn tux-tn added 🎉 first-pr ready-to-land For PRs that are reviewed and ready to be landed labels Aug 24, 2021

@profnandaa profnandaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contrib! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 first-pr ready-to-land For PRs that are reviewed and ready to be landed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Union pay cards with 81 range fails isCreditCard check

4 participants