@ShamSuther
Posted
Congratulations on completing the challenge! ✨🎉 You did a great job with the design and the JavaScript code looks pretty accurate. I have a suggestion that might make the design even better. Instead of adding all the invalid input properties directly as inline styles in JS, you could consider adding them to a class in CSS. This would make it easier to manage and update the design in the future.
input.invalid{
border : 1px solid rgb(236, 62, 62);
color : rgb(236, 62, 62);
background-color: rgb(252, 208, 208);
}";
With this approach, you can easily add or remove those properties to an element just like that.
input.classList.add("invalid");
input.classList.remove("invalid");
I hope you find this somewhat helpful, keep up the fantastic work, and enjoy coding! 😊💻✨
Marked as helpful