fac-14 / teamcoolerweek-2

To-do-list project
1 stars 1 forks source link

Empty Input #32

Closed iPhatty closed 6 years ago

iPhatty commented 6 years ago

https://github.com/fac-14/teamcoolerweek-2/blob/4b588fb49da82ef7d3bdaea8458d8c7c54c80362/dom.js#L62-L66

Nice to see you all thinking about a JS version of validating empty inputs. Your HTML already has the required field so this piece of code may never be executed.

Also, if you would like to do the alert and then do nothing, you can just write return; instead of return false;

I am actually also able to add empty todos by spamming the space bar, can you find a way to validate this in JS? 😈

screen shot 2018-07-13 at 10 35 26
sbinlondon commented 6 years ago

Some more JS wizardry for y'all to get into @Zeanort @thejoefriel