@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
@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.