Diners Club Formatting
vinceprofeta opened this issue · 4 comments
It seems the diners club formating is wrong.
Stripe testing has 3056 9309 0259 04
as diners club sample test card
https://stripe.com/docs/testing
I believe the format should be: /(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{1,2})?/
{ type: 'dinersclub' pattern: /^3[0689]/ format: /(\d{1,4})(\d{1,6})?(\d{1,4})?/ length: [14] cvcLength: [3] luhn: true }
Would be open to a pull request if there is something here that needs fixing.
I know we're testing that diners club here
A good first start would be to just write a few failing tests to better illustrate the problem.
Hi there. I'm wondering if this is the same issue as you were seeing @vinceprofeta
When typing in the sample diner's club cc number to the form, when typing the second '5' the cursor shifts ahead of the 5 (Can see the result of typing the number 3056 9309 0259 04
exactly in order in the attached screen shot)
@mcarson-123 neat, thanks for the reproduction steps. Have you experimented if this would be fixed by the updated regex that @vinceprofeta provided?
Alright, updated the format in the 1.2.1 release, thanks for the report @vinceprofeta.