Skip to content
Submitted about 4 years ago

E-mail validation using HTML5 and :invalid pseudo-element

LVL 2
@GregLyons
A solution to the Pod request access landing page challenge

Solution retrospective


I tried to do this solely using HTML and CSS, but I found that I needed JavaScript because, even if I set 'minlength="1"' on the <input> element, it still accepts empty inputs as valid (even with 'type="email"'). Does anyone know how to make the min length work for length 0? I've gotten it working for, e.g. 'minlength="4"'...

Any other feedback is also welcome!

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Grog the Frog’s solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord