jquery-creditcardvalidator icon indicating copy to clipboard operation
jquery-creditcardvalidator copied to clipboard

Data-Mask breaks validation

Open ModelosPR opened this issue 7 years ago • 3 comments

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?

ModelosPR avatar Aug 11 '17 23:08 ModelosPR

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.

PawelDecowski avatar Aug 12 '17 09:08 PawelDecowski

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

ModelosPR avatar Aug 21 '17 14:08 ModelosPR

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

PawelDecowski avatar Sep 07 '17 10:09 PawelDecowski