Submitted over 1 year agoA solution to the Intro component with sign-up form challenge
Intro Component with Sign-up Form using Vanilla HTML, CSS & JS
LVL 1
@kmlrdzwn

Solution retrospective
What are you most proud of, and what would you do differently next time?
- Adding svg icon inside input by adding wrapper with
position: relativeand the icon withposition: absolute - Use regex email pattern
- Learn to select element inside wrapper with closest method.
- Show error state and remove error state logic
- Validate individual input with email pattern or if the input is empty
input.value.trim() === ''- this is the hardest logic pattern for me :( - Learn check Regex pattern with test() method.
- Add error with blur event listener (this fires when the input has lost focus)
- Remove error with focus event listener (this fires when the input is in focus)
- Add form submission logic by using the
validateInput()function
- Strengthen up my js logic pattern with a lot of googling and try-error.
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Kamal Redzwan’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