collins-kiprotich/portfolio

Bugs: hide-and-seek issue

Opened this issue · 0 comments

Great job so far @collins-kiprotich ,
✅Used meaningful variables.
✅No linter issue.

I feel there is 1 small issue which can be rectified
1-What is the issue?
While typing the input in email 2nd time after the issue the invalid class is going the be removed.
image
image

2- Where is the issue

email.classList.toggle('invalid');

email.classList.toggle('invalid');

3- Solution
I feel Instead of toggle you can use add in classList so that it will going to add only since toggle will do both add if not there and remove is it is already there.