diff options
-rw-r--r-- | epirts.js | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -84,6 +84,13 @@ var Stripe = Epirts = (function() { }; pub.validateCVC = function(cvc) { + cvc += ''; + if (cvc.match(/\D/)) { + return false; + } else if (cvc.length < 3 || cvc.length > 4) { + return false; + } + return true; }; pub.cardType = function(number) { |