ChangeOrder doesn't set desired prioritiesSee original GitHub issue
- Library version: v8.2.0
I added a custom card (
custom-card) with some validator closely related to Maestro, then I changed my
custom-card order to position 0 but I still get maestro coming up as the card type.
I debugged using
Validate.creditCardType(''), and I was able to verify that my
custom-card was in position 0.
Thanks for the awesome library. Looking forward to getting some feedback.
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
This is expected behavior for card validator.
It will only mark something as valid when it determines that there is only one possible card type. Since
506 can match either maestro or your custom card, that’s the expected outcome. Sounds like you need to make your custom card more specific for what ranges it supports (and possibly update the maestro card pattern as well)