It would be nice to include in your regexp this maestro cards:
6759649826438453
6799990100000000019
thanx!
Maestro isn't a credit card, but a debet card.
I would prefer second method isDebetCard() and optionally a validator isPayCard() or somthing which would allow for both credit or debet cards in the validation.
Please do not include maestro in credit card by default though; that way the name of the method does not longer reflect the actual validation. Thanks very much!
Technically you correct, but you cannot judge credit/debit only by card number. A lot of visa/master cards are debit and valid according to this validator.
Fair enough. I would prefer another validator name in that case though.
Do we use Luhn Algorithm to validate credit card numbers within this library or something else?
@denjaland as far as I know only an issuing bank can tell you if a card is debit or credit, you cannot determine type just from the numbers; that being said, binlist lookup - identifies some card types for US and Canada;
@roydondsouza you are right, which is why I still would prefer a method "isPayCard" ;-)
a method "iscreditcard" does not do what it promises :-)
Anyone still needs this?
@profnandaa yes I would like it to be added
Some Brazilians credit card have the same issue.
Elo and some MasterCard like 5031 4332 1540 6351
+1 on Elo and some MasterCard. Same issue here.
I will take a look at this and probably raise a PR for the same.
Cc. @profnandaa.
@profnandaa Support for 19 digit card numbers was added in #1161. This was the main issue here. So it may be closed OR if we need to rename the isCreditCard method to isPayCard, I'd be happy to make a PR :)
Sure we can close this one, no need to rename. Thanks for spotting.
Most helpful comment
Some Brazilians credit card have the same issue.
Elo and some MasterCard like 5031 4332 1540 6351