Missing spaces
fogush opened this issue · comments
Expected behavior
Credit card numbers (for fields with .payment('formatCardNumber'))
It should include a space between every 4 digits for all numbers
Actual behavior
For non-valid card numbers (I didn't check everything, maybe a reason is in something else) the space is not added. For example, a credit card number with all zeros will be '0000000000000000' instead of '0000 0000 0000 0000'. The same for numbers like '1111111111111111', '9999999999999999' and others.
I have found some old version on this site: https://stripe.com/blog/jquery-payment. It doesn't have this issue
Steps to reproduce
Open the demo (http://stripe.github.io/jquery.payment/example/)
Enter 0000000000000000 in the first field ("Card number formatting")
Hi there @fogush. jquery.payment doesn't know how to format unknown numbers. 0000 etc are not real card numbers. You can see some similar old closed issues.