Design comparison
Solution retrospective
Hallo everyone! Could someone tell me how to add the Warning icon inside the input field after the validation? All advice and comments are welcome!
Community feedback
- @Alex-GamaranoPosted 9 months ago
Hey @OsmanSamar, My approach to this challenge was to create a class: .error { background-image: url("./images/icon-error.svg"); background-repeat: no-repeat; background-position: 95%; }
Than you can use Java Script to toggle that class.
Also, within your solution you are rellying on the HTML 5 required attribute for each input field. That is not uite what the challenge proposed. You should be able to use JS to verify the state of each field and display the messages below them.
I just finished the same challenge. Here is my solution: https://alex-gamarano.github.io/intro-component-with-signup-form-master/
Feel free to give me your feedback.
Best regards, Alex
Marked as helpful0
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