ソースを参照

Update cvv.js

Remove non-numeric characters from creditcard before checking its length to determine the card type.
evilchili 11 年 前
コミット
b0cfd1ef4c
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/js/validator/cvv.js

+ 2 - 0
src/js/validator/cvv.js

@@ -34,6 +34,8 @@
             if (creditCard == '') {
                 return true;
             }
+            
+            creditCard = creditCard.replace(/\D/g, '');
 
             // Supported credit card types
             var cards = {