Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive Card Details Form with SCSS

Eseoghene 550

@EseAlli

Desktop design screenshot for the Interactive card details form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Feedback is appreciated.

Community feedback

@MasonBoom

Posted

Hello,

Although this is a very well done project, there is always room for improvement.

I noticed that the only required fields are the exp.date and the cvc. shouldn't all areas be required?

Also, I noticed I was able to add letters in the card number, cvc, and exp.date. You can fix this by adding the following code to those input tags in the html file: type="tel" inputmode="numeric" pattern="[0-9]*"

This next part is optional, but you can also format the credit card number so it automatically adds a space every 4 digits by using this function:

const cardNumberFormat = (number) => { return number.replace(/(\d{4})/g, '$1 ').trim() }

Hope this helps!

0

Eseoghene 550

@EseAlli

Posted

@MasonBoom thanks for the feedback

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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