Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion library/src/actions/creditCard/creditCard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ describe('creditCard', () => {
});

test('for Visa', () => {
expectNoActionIssue(action, ['4242424242424242', '4000056655665556']);
expectNoActionIssue(action, [
'4242424242424242',
'4000056655665556',
'4007000000027',
]);
});

test('with space dividers', () => {
Expand Down
2 changes: 1 addition & 1 deletion library/src/actions/creditCard/creditCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface CreditCardAction<
* Credit card regex.
*/
const CREDIT_CARD_REGEX =
/^(?:\d{14,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u;
/^(?:\d{13,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u;

/**
* Sanitize regex.
Expand Down
Loading