Design comparison
SolutionDesign
Solution retrospective
The website works fine except for one thing:
- if you first submit a real email adress everything is fine
- if you then submit a wrong one the error message appear which is also fine -however if you then try to submit a real adress WITHOUT REFRESHING THE PAGE it doesn't submit it anymore Can anyone help me out? Thank you!
Community feedback
- @nicobreinsPosted over 3 years ago
In HTML5 input type='email' by default show error if email is not formatted correctly. You don't need to use JS.
0@nicobreinsPosted over 3 years agoThough if you want to show custom error message with custom style use regex to validate email.
See solution here: https://stackoverflow.com/questions/60272725/email-validation-using-javascript-with-a-custom-message-below-the-input-field
0
Please log in to post a comment
Log in with GitHubJoin 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