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

signup-form basic vanilla js-css form-validation

Aborkā€¢ 340

@ayberkkk

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


How can I show the error messages in the form, can you help me?

Community feedback

P
Luciano Limaā€¢ 1,290

@LucianoDLima

Posted

Hey, good job on finishing this challenge!

About your question, there are a few ways of going about it. One of them would be to create a css class that has display: none; inside, and then you add it to the error message, that way it won't show up. Then you make a trigger in js so that whenever there's an input error, the class is added to the error message, that way the message will appear, then if the user writes the correct information, the class is removed again.

Hope it makes sense! Happy coding!

Marked as helpful

1

Aborkā€¢ 340

@ayberkkk

Posted

@LucianoDLima Thank you very much for your suggestion, I will try that. I tried to print <span class="err-text"></span> by assigning the err-text class in the Javascript part, but there was only one message, so I removed the messagge feature.

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