Saturday, February 09, 2019

Shame On CodeCademy - Corrupting Young Minds :)

Just kidding, but, why not be correct, in addition to whetting peoples' appetite.

In their lesson :

If you want to find out more about Regex, read more at MDN's regex article.

To see it in practice, let's use the pattern attribute in our HTML!

Instructions
1. We might also want to limit usernames to only letters and numbers (and not special characters like ! or @).
To add this validation, add a pattern attribute and set it to: "[a-zA-Z0-9]+" in the first <input> element.

Incorrect maestro! First character may not be a numero. So, it's [a-zA-Z][a-zA-Z0-9]+

These guys have thought of everything. Inspect their page with Chrome, and you see :

👋 Hi there!
Looks like you're using the developer tools on our site.
While you're in the area, how about popping over to https://careers.codecademy.com?
We're hiring for passionate, talented engineers, and would love to hear from you! ✨

No comments: