Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update formatters.ts #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update formatters.ts #1

wants to merge 1 commit into from

Conversation

fabcall
Copy link

@fabcall fabcall commented Jan 22, 2021

Replace the length implementation since the user could be copy / pasting a shorter value (which should be formatted as well).

Replace the length implementation since the user could be copy / pasting a shorter value (which should be formatted as well).
@halilb halilb self-requested a review January 23, 2021 17:00
Copy link
Owner

@halilb halilb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @fabcall.

I'm afraid this is breaking the formatter though: Try typing 5555 to the card number input. It won't be formatted to 5555 . You may also check the tests are failing by running yarn test.

I think we should cover the case you mentioned though. Can you try fixing it without breaking tests? Also, could you create a test for your case in formatters.test.ts?

@fabcall
Copy link
Author

fabcall commented Jan 23, 2021

Hey @halilb , for sure, I'll take a look at this later today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants