angular-payments icon indicating copy to clipboard operation
angular-payments copied to clipboard

Validate digit and reorder test.

Open alexismartin opened this issue 10 years ago • 3 comments

Fixes issue #49 and #51.

alexismartin avatar Sep 09 '14 09:09 alexismartin

+1

tjwallace avatar Sep 30 '14 16:09 tjwallace

+1

jamesbrobb avatar Oct 23 '14 11:10 jamesbrobb

@alexismartin i've noticed that there's also a (mildly annoying but not fatal) issue when deleting the expiry date in firefox. The backslash is deleted on key down, but then re-added on press by the _formatForwardExpiry handler method

line 333 needs to be changed from

if (/^\d\d$/.test(val)) {

to

if (/^\d\d$/.test(val) && /^\d+$/.test(digit)) {

That said, i can't actually see the purpose of the _formatForwardExpiry handler method, as the existing conditional logic only equates to true when the delete key is being pressed. Otherwise _formatExpiry deals with adding the forward slash as the user types.

jamesbrobb avatar Oct 23 '14 12:10 jamesbrobb