Design comparison
Solution retrospective
š¦ Hi Frontend Mentor Community!
It is my first solution to
šŖ Newbie Challenge: Ping Single Column Coming Soon Page
Feel free to check out my codes
.
ššØšØ My solution is simple Vanilla HTML , CSS , and JavaScript.
š”š Lighthouse Audit Ave. Scores
ā” 95% š± - 99% š„ļø | Performance
š¦Æ 95% | Accessibility
ā 100% | Best Practices
š 100% | SEO
I plan to finish all challenges using this approach, but I will upgrade my stacks āļøāļøš in the future. šÆ
Follow me with my coding journey!
Happy coding! š„°
Community feedback
- @kimodev1990Posted 11 months ago
Really great work, Just a few feedbacks :
- If I don't enter an email or entered a wrong form of email in the input , Then you entered the right email , the label error doesn't disappears .
- If you add space at the beginning or end of email ( not between email ), It gives an error.
You could use in javascript:
const form = document.querySelector(".class name you provide in form tag"); const inputEmail = document.querySelector(".class name you provide in input tag"); const errorLabel = document.querySelector(".class name you provide for error"); form.addEventListener("submit", (event) => { event.preventDefault(); if (validateEmail(inputEmail.value.trim()) === true) { showError(); } else { hideError(); } }); function validateEmail(inputText) { const mailFormat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if (inputText.match(mailFormat)) { return false; } return true; } function showError() { errorLabel.classList.remove("hidden"); } function hideError() { errorLabel.classList.add("hidden"); }
Hope you find this Helpful.
Marked as helpful1@jilenskiPosted 11 months ago@kimodev1990 Thank you so much for checking! š I wasn't able to notice that. Your feedback was really helpful. I have already made a revision to my code. š
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