10bis / CompactCreditInput

A compact credit card input field that combines the number date and cvv into a single field
GNU General Public License v3.0
45 stars 10 forks source link

NumberFormatException crash while using the library #14

Open cohenlior opened 1 year ago

cohenlior commented 1 year ago

Hi Gil,

We are getting: Fatal Exception: NumberFormatException: For input string: "/" in CreditCardDateMaskWatcher.kt, onInvalidContent(CreditCardDateMaskWatcher.kt:56)

I cannot reproduce it, but it is gaining momentum for some users.

Can you please help us and fix it? :)

Thanks in advance!

gilgoldzweig commented 1 year ago

It happens when dealing with pasting dates. If I'm not wrong. I'm not sure If I currently have time to fix it, but it should a relatively simple fix

cohenlior commented 1 year ago

Yes, you are probably right for the reason and of course for the fix. will it be helpful if we open a pull request?

gilgoldzweig commented 1 year ago

By all means, it shouldn't be too difficult, I just don't have time to deal with it at the moment