Spaces aren't inserted correctly when formatting a card number input
courthead opened this issue · comments
12345
doesn't match any known credit card formats, so jquery.payment
doesn't know how to format it. Try 4242 4242 4242 4242
for a valid fake Visa, for example. You can see some additional fake cards here: https://stripe.com/docs/testing
Ah, I was thinking that even if the user makes a mistake (resulting in the number being invalid), it'd be nice to still format the numbers in some common way, like groups of four separated by spaces (e.g. 1234 5678 9012 3456
).
Actually, @courthead suggestion (4-digit groups instead of ungrouped by default) makes sense. It would be great if this behavior could be configurable.
@jenanwise: Would you guys be interested in adding something in that line?