What are you most proud of, and what would you do differently next time?
I’m most proud of how I organized and implemented the form validation logic for the contact form. Using an array of objects to map each input field to its corresponding error message really streamlined the code and made it easier to maintain. It also allowed me to avoid repeating the validation logic for each field, making the code more efficient.
Next time, I would focus on improving the user experience by enhancing the error message visibility (e.g., using animations or color transitions). I would also experiment with custom radio button designs for better aesthetics and ensure my form is fully responsive for different screen sizes.
What challenges did you encounter, and how did you overcome them?
One of the biggest challenges I faced was implementing email validation correctly. The regular expression I initially used was not catching all edge cases, like email addresses with multiple dots or special characters. To overcome this, I researched common patterns for email validation and updated the regex accordingly, ensuring it properly handled different email formats.
Another challenge was managing error messages for multiple fields. Since I had many fields with similar validation rules, I needed a clean way to display error messages without repeating code. Using an array of objects for field and error mappings really helped with this issue and made the code more readable and manageable.
What specific areas of your project would you like help with?
I’m looking for advice on improving the form's accessibility, especially regarding how error messages are presented for users with screen readers. Additionally, I’d appreciate feedback on how to handle more complex form validations, such as checking if an email already exists in a database, and integrating that with the form submission process.