Skip to content

Conversation

manmeetskalra
Copy link
Contributor

Fixes Issue

**My PR closes #760 **

πŸ‘¨β€πŸ’» Changes proposed(What did you do ?)

  • Added min="12" and max="120" to age input field.

βœ”οΈ Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.

Note to reviewers

I have added minimum age as 12 and the maximum as 120 as it was not mentioned what will be the upper bound

πŸ“· Screenshots

Screenshot 2025-04-08 at 3 54 28β€―PM Screenshot 2025-04-08 at 3 54 37β€―PM

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Compliance Checks Passed!

Copy link

vercel bot commented Apr 8, 2025

@manmeetskalra is attempting to deploy a commit to the dunsin's projects Team on Vercel.

A member of the Team first needs to authorize it.

@manmeetskalra manmeetskalra changed the title Bug #760: fixed age validation fix: restrict invalid values in age input field Apr 8, 2025
Copy link

vercel bot commented Apr 8, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
whisper-b2p2 βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 9, 2025 6:02am

@Dun-sin
Copy link
Owner

Dun-sin commented Apr 8, 2025

@manmeetskalra i noticed the following bugs:

  • you can only use the buttons to increment an age
  • you can't remove the entire age and add yours
  • and the 0 at the end isn't meant to be either

your best chance at fixing this is providing real time error messages or wait till the user adds a younger age and then throw an error at submission(which i think we already do)

@manmeetskalra
Copy link
Contributor Author

@manmeetskalra i noticed the following bugs:

  • you can only use the buttons to increment an age
  • you can't remove the entire age and add yours
  • and the 0 at the end isn't meant to be either

your best chance at fixing this is providing real time error messages or wait till the user adds a younger age and then throw an error at submission(which i think we already do)

Thanks for the feedback!
I guess that is correct and here's what I'll do to improve:

  • I'll remove the restrictive onChange logic
  • I'll allow users to freely enter/edit their age
  • I'll add an age validation on form submission

Copy link
Owner

@Dun-sin Dun-sin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did great, thanks for contributing buddy, I hope you will stick around and continue to contribute to this project.

Consider giving this project a star, sharing the project with your friends, and joining the community discord server if you haven't for more resources and opportunities to connect with others. πŸ‘‰πŸ½hereπŸ‘ˆπŸ½

@Dun-sin Dun-sin merged commit c86f815 into Dun-sin:main Apr 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Age input is not limiting the value
2 participants