diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-25 22:21:04 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-25 22:21:04 -0500 |
| commit | 98e21c4f1b096fc117a6a0f770bb69ab7c83914d (patch) | |
| tree | 00b5d074b011fc26084b37dd662e4fc95f75c492 /StoneIsland/www/js/vendor/jquery.creditCardValidator.js | |
| parent | ec87912a5ca1c0d6862b07012fdbbdf2d4b4f86a (diff) | |
validate cc number
Diffstat (limited to 'StoneIsland/www/js/vendor/jquery.creditCardValidator.js')
| -rw-r--r-- | StoneIsland/www/js/vendor/jquery.creditCardValidator.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/StoneIsland/www/js/vendor/jquery.creditCardValidator.js b/StoneIsland/www/js/vendor/jquery.creditCardValidator.js index a9117abe..3ec39f27 100644 --- a/StoneIsland/www/js/vendor/jquery.creditCardValidator.js +++ b/StoneIsland/www/js/vendor/jquery.creditCardValidator.js @@ -181,11 +181,12 @@ IN THE SOFTWARE. return function() { var number; number = normalize($(_this).val()); + console.log(number) return validate_number(number); }; })(this); normalize = function(number) { - return number.replace(/[ -]/g, ''); + return (number || "").replace(/[ -]/g, ''); }; if (!bind) { return validate(); |
