Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 3 days ago

Newsletter Form with TailwindCSS and JS Live Validation

tailwind-css
Curry•90
@HotChickenCurry
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I’m most proud of successfully implementing form validation with live feedback and a success page redirect. I also paid attention to accessibility by using proper labels, error messages, and ARIA attributes. Seeing everything come together with Tailwind for styling made me feel like I’m getting better at writing clean and structured code.

What challenges did you encounter, and how did you overcome them?

One big challenge was getting the form validation right—especially checking for empty values, validating emails, and showing/removing error styles dynamically. I solved this by breaking the logic into smaller functions and testing step by step.

Another challenge was hiding the email in the URL after redirecting to the success page. I overcame this by learning about the history.replaceState method, which let me display the email but clean up the URL for better security and user experience.

What specific areas of your project would you like help with?

I’d like help with:

Writing shorter, cleaner validation code (maybe with regex or built-in validation features).

Best practices for accessibility when handling error messages and success states.

Suggestions on how to make my code more reusable and scalable for bigger projects.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Curry'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License