summaryrefslogtreecommitdiffstats
path: root/epirts.js
diff options
context:
space:
mode:
Diffstat (limited to 'epirts.js')
-rw-r--r--epirts.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/epirts.js b/epirts.js
index 9a538af..ad3044f 100644
--- a/epirts.js
+++ b/epirts.js
@@ -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) {