Submitted about 2 years ago
Interactive Card Component with some validations
@FelipeCastroDEV
Design comparison
SolutionDesign
Solution retrospective
Hi guys, I hope you like my solution. I made this project with vite and imported imask to do some validations..
I put a regex to validate the card, if by chance the card starts with 4 it will be a visa, and for masters the rule is a little more complex, who wants to know more just go to my github.
I put it to change the logo as soon as the card type is recognized.
the month field only goes up to 12, and the year field goes from the current year up to 10 years ahead.
your feedback is very helpful!
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord