PawelDecowski / jquery-creditcardvalidator

jQuery credit card validation and detection plugin
jquerycreditcardvalidator.com
MIT License
1.06k stars 275 forks source link

Data-Mask breaks validation #110

Open ModelosPR opened 7 years ago

ModelosPR commented 7 years ago

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?

PawelDecowski commented 7 years ago

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.

ModelosPR commented 7 years ago

Hi, Where you able to find anything on this? Thank!

PawelDecowski commented 7 years ago

Sorry, I’ve been quite busy lately! I’ll look into it as soon as I can.