stripe-archive / jquery.payment

[DEPRECATED] A general purpose library for building credit card forms, validating inputs and formatting numbers.
MIT License
3.53k stars 686 forks source link

Please allow CVC be longer then 4 digits #256

Closed Paxa closed 7 years ago

Paxa commented 7 years ago

In current implementation it's strictly <= 4


  restrictCVC = function(e) {
    var $target, digit, val;
    $target = $(e.currentTarget);
    digit = String.fromCharCode(e.which);
    if (!/^\d+$/.test(digit)) {
      return;
    }
    if (hasTextSelected($target)) {
      return;
    }
    val = $target.val() + digit;
    return val.length <= 4;
  };

But some banks have private label cards, that can have longer cvv number

Paxa commented 7 years ago

Also would be nice to have access to cardFromNumber, cardFromType, cards, defaultFormat, formatBackCardNumber, formatBackExpiry, formatCardNumber, formatExpiry, formatForwardExpiry, formatForwardSlashAndSpace, hasTextSelected, luhnCheck, reFormatCVC, reFormatCardNumber, reFormatExpiry, reFormatNumeric, replaceFullWidthChars, restrictCVC, restrictCardNumber, restrictExpiry, restrictNumeric, safeVal, setCardType from outside.

I never understand what is benefited to make plugin not customizable by making variable hidden

jenan-stripe commented 7 years ago

Hi there -- sorry, but we're not adding new features at this time. Please see the project status in the readme.

Paxa commented 7 years ago

Ok, thank you for fast response!