@vanzasetia
Posted
Hey, Mariano Alvarez! π
When I submitted the form with a valid first name and last name, and invalid password, and email, all the inputs were get cleared.
As a user, I would expect those inputs with valid values should not be cleared. Otherwise, I had to keep filling in all inputs (which is a lot of work for the user).
Also, what is the valid password? As a user, I don't know what is a "valid" password. You need to provide some information about what a valid password should be. For example, it needs to be at least 8 characters, etc. You can see my solution for the example. (This was also a mistake that I made)
One more suggestion I have is to avoid using JavaScript to add styling (unless you have no other option). JavaScript allows you to change the CSS code using the style
property. But, to make debugging easier and improve code maintainability, itβs best to avoid it. Use CSS classes instead.
That's it! I hope this helps!
Marked as helpful