Design comparison
Solution retrospective
This is my solution for the Age Calculator App.
It was overall easy and enjoyable building this project, however I faced a difficulty regarding functionality:
- I would basically like to find out how to validate the form based on day and month input. You can type in
#day-input
every number from1
to31
nevertheless there is no validation regarding month restrictions (for example you can type 31 February and it will generate an output). Is there any regex available or do I need to set specific limitations in the JS script?
I would appreciate your feedback and would like to receive your comments and perspectives regarding the project. Thanks a lot!
Community feedback
- @LoaiEsam37Posted over 1 year ago
cool but try to learn a framework like react or vuejs it will make your life easier and it will add security to your code (prevent XSS, html injection and many more)
hope you found this helpful 😊
0 - @TripouillePosted over 1 year ago
Hi Petros!
I would recommend using a date library such as Moment or Date-fns to validate if the inputted date is valid, as these libraries have built-in functionality to handle date validations, including checking for valid day and month combinations. This will help ensure that the generated output is accurate and avoids any potential issues with invalid dates, such as 31 February. Keep up the good work, and congratulations on your project!
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