Skip to content
This repository has been archived by the owner on Jan 10, 2018. It is now read-only.

formatCard spacing breaks after 4th character #198

Closed
mattLummus opened this issue Jan 11, 2016 · 2 comments
Closed

formatCard spacing breaks after 4th character #198

mattLummus opened this issue Jan 11, 2016 · 2 comments

Comments

@mattLummus
Copy link

Using the code:
$('#subscription_cc_num').payment('formatCardNumber');

The space in between every 4 characters stops working once you enter more than 4 characters.

I can see it after the 4th...
screen shot 2016-01-11 at 11 09 38 am

But once I type in a 5th it reverts.
screen shot 2016-01-11 at 11 09 43 am

Have tested this in Chrome, Firefox, and Safari. Running on Macbook Pro, Yosemite.
Have also tested this in a demo I found online with same results. http://jsfiddle.net/gosseti/jv8j53nb/9/

@jenanwise
Copy link
Contributor

Hi @mattLummus. The spacing between each group depends on the card type. If you enter 42424, you'll see the grouping remain. 12345 isn't a known prefix so it reverts to ungrouped.

@mattLummus
Copy link
Author

@jenanwise That makes sense however I did not see this in the documentation. Thanks for the quick response!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants