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 Detail Form built with React

Sean 150

@sjoseph91

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


I think I spent too much time with the form validation in JavaScript. Does anyone recommend a specific form, or form validation library that goes well in React apps?

Community feedback

Declan 220

@engelbrechtz

Posted

Hey, hows it going? 👋

Everything seems to be looking good.

"Does anyone recommend a specific form, or form validation library that goes well in React apps?"

Yes. But, I wouldn't recommend using any libraries yet. I've made this mistake alot. I would not understand how you would do it in vanilla for that's what they ask you in job interviews for any developer field. Is... Can you do it without external libraries and how would you do it?

You can check out Formik for form validation when it comes to using a framework like React.js.

A part about being a developer is to, Build strength from struggle. A qoute that I came up with, I'm not certain if anyone else has. Besides the irrelevance. Build small projects that you find interest in.

Otherwise, Enjoy!

Marked as helpful

1

@digital-stew

Posted

recently learned this myself but look at the type, lets you have numbers without the ugly ^^ in the input field

    <label>
      CARD NUMBER
      <input
        type="tel"
        autocomplete="off"
        maxlength="16"
        name="number"
        id="cardNumber"
        placeholder="e.g. 1234 5678 9123 000"
        onkeypress="return event.charCode >= 48 && event.charCode <= 57"
        title="card number"
      />
      <div id="error-number" class="error-text"></div>
    </label>

Marked as helpful

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