jquery-creditcardvalidator
jquery-creditcardvalidator copied to clipboard
Data-Mask breaks validation
I would like to be able to format the credit card, as it is input, make it easier to read. I tried using bootstrap-inputmask with the code data-mask="9999 9999 9999 ?9999 999"
, which formats it nicely. However, the input will not validate.
I tried utilizing .replace(" ", "");
at several points in an attempt to eliminate the blank spaces before validation with no success.
Any suggestions?
You don’t need to remove spaces. The plugin normalizes the number by removing spaces and dashes.
I have no idea why it doesn’t work with bootstrap-inputmask. First thing that comes to mind is that one unbinds the other’s events. jCCV’s events are namespaced since v1.0 so that shouldn’t happen, though.
I’ll do some tests and get back to you.
Hi, Where you able to find anything on this? Thank!
Sorry, I’ve been quite busy lately! I’ll look into it as soon as I can.