-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: enchance isCreditCard #2008
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey there, instead of making a case specific validator, I would suggest something like isDebitcard or isCreditCard followed by provider as a param
hey @rubiin i have refactored the isCreditCard file, |
ad04c62
to
9bdd5eb
Compare
Codecov Report
@@ Coverage Diff @@
## master #2008 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 104 104
Lines 2203 2210 +7
Branches 477 481 +4
=========================================
+ Hits 2203 2210 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, lets wait for others
Thank you @rubiin. @profnandaa when you have an opportunity please do look at the PR. Much appreciated! |
apologies, thought this was approved and started cleaning up too soon. PR is reopened and waiting for approval from @profnandaa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found out that we already have isCreditCard. You can enhance it by adding your changes. We might have to consider releasing this on next major release as it would introduce a breaking change
@rubiin - i did modify the existing isCreditCard file, and ensured it was backwards compatible. can you evaluate the diff? you will see you can still pass in a credit card number without the second param, and still get the same result. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @rubiin and @profnandaa - is there an additional person that can approve this PR? I would like to get it merged to main. Thank you! |
Lets wait for @profnandaa |
@profnandaa and @rubiin , is there an additional person that can approve this PR? I would like to get it merged to main. Thank you! |
@WikiRik would you be able to review this PR ? Thank you! |
@brianwhaley I can, but my review won't get this merged faster unfortunately. We'll have to wait for @profnandaa Either way you can still use this specific commit in other projects, see this NPM docs |
Add regex validation for AmEx card