braintree / restricted-input

Restrict <input>s to certain valid characters (e.g. formatting phone or card numbers)
https://braintree.github.io/restricted-input/
MIT License
68 stars 25 forks source link

Fix Samsung Internet Browser formatting #110

Closed doniarobinson closed 6 months ago

doniarobinson commented 7 months ago

This PR is specifically to fix a bug noted in issue LI-35763 where, in Samsung Internet Browser only, the expiration date was not automatically adding a forward slash and there was no way a user could add it. Because of this, later on in the process (after the submit button was pressed), the date was not validating correctly so the transaction would not go through successfully.

To test: create a sample application with card fields and test locally with BrowserStack (use domain bs-local.com). Choose an Android device with Samsung Internet Browser. Fill in the date using only the phone keypad and ensure the forward slash gets added in automatically.

Integration tests aren’t currently working, but it is recommended to come back and add integration tests for the validation of expiration date in Samsung Internet Browser and several other browsers.

Broken:

Screenshot 2024-03-26 at 9 52 15 AM