Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

bug fix: prevents non numeric characters in card number field when lengt... #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/angular-payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ angular.module('angularPayments', []);angular.module('angularPayments')
digit = String.fromCharCode(e.which);

if(!/^\d+$/.test(digit)) {
e.preventDefault();
return;
}

Expand Down Expand Up @@ -809,4 +810,4 @@ angular.module('angularPayments', []);angular.module('angularPayments')
});
}
}
}]);
}])
4 changes: 2 additions & 2 deletions lib/angular-payments.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ angular.module('angularPayments')
digit = String.fromCharCode(e.which);

if(!/^\d+$/.test(digit)) {
e.preventDefault();
return;
}

Expand Down