You Don’t Need JavaScript for That, by Kevin Powell
HTML-код
- Опубликовано: 6 ноя 2024
- It can be easy to hack together a quick JavaScript solution, but often we're creating more work for ourselves in doing so! There are tons of very simple CSS solutions to common issues people use JavaScript to solve, without even having to get into the new modern CSS solutions that are opening up even more possibilities.
Speaker: Kevin Powell
CSS Evangelist
#javascriptday2024
Form vlidation:
front-end: for the user,
back-end: for yourself
Incredible stuff Kevin! Love your positivity brother and your knowledge is seemingly infinite 🎉
Lord KP on JetBrains 🤩
Awesome!
Hello Frontend Friends!
😒
For the password, I'd modify the regex to limit the total number of word chars and number chars, respectively. E.g. (?=....){,8}(?=...){,4}, where the first group your word chars and your 2nd your numbers.
Also, I get the ^ and $. Those makes sense, maybe. But the `.*` and `.+`, why would that be allowed in a password field when you already have ^ and $ bounding (but not limiting) user input?
I'd test it to see if you can't copy paste a whole script in there... I know I'm probably nit picking, but regex is kind of my thing (literally just finished a refactoring engine using regexes).