You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to add a new card that has the same starting digit (pattern) as a Visa card, the card-validator library identifies it as a Visa card. This results in the new card being rejected because the card lengths defined for Visa (16, 18, or 19 digits) do not match the length of the new card (e.g., 13 digits).
Steps to reproduce
Attempt to add a new card with a specific pattern (e.g., starting with 4) and a length of 13 digits.
The new card is identified as Visa card and not new-visa due to pattern conflict and the card is rejected.
Expected Behavior:
The library should distinguish between card types more effectively, allowing the addition of new cards with lengths and patterns that may conflict with existing card types like Visa.
The text was updated successfully, but these errors were encountered:
General information
Issue description
When trying to add a new card that has the same starting digit (pattern) as a Visa card, the card-validator library identifies it as a Visa card. This results in the new card being rejected because the card lengths defined for Visa (16, 18, or 19 digits) do not match the length of the new card (e.g., 13 digits).
Steps to reproduce
Attempt to add a new card with a specific pattern (e.g., starting with 4) and a length of 13 digits.
The library incorrectly identifies the card as a Visa card.
const cardValidation = valid.number(<13-digit-number>);
The new card is identified as Visa card and not new-visa due to pattern conflict and the card is rejected.
Expected Behavior:
The library should distinguish between card types more effectively, allowing the addition of new cards with lengths and patterns that may conflict with existing card types like Visa.
The text was updated successfully, but these errors were encountered: