Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Input Validation for Age in Astronomical Age Calculator #1612

Closed
SaiTejaswaniBikkasani opened this issue Jun 14, 2024 · 2 comments · Fixed by #1858
Closed

Add Input Validation for Age in Astronomical Age Calculator #1612

SaiTejaswaniBikkasani opened this issue Jun 14, 2024 · 2 comments · Fixed by #1858
Assignees

Comments

@SaiTejaswaniBikkasani
Copy link
Contributor

Hey @Sulagna-Dutta-Roy

Describe the bug
The Astronomical Age Calculator allows users to input negative ages, as shown in the attached screenshot. This happens because the input field for age does not have a minimum value constraint, leading to invalid age calculations.

To Reproduce
Steps to reproduce the behavior:

  • Open the Astronomical Age Calculator application.
  • Enter a negative value (e.g., -9) in the age input field.
  • Click on the "Calculate" button.
  • Observe the error message prompting for a valid age

Expected behavior
The application should prevent users from entering negative values for age. The input field should accept only positive values (including zero if applicable)

Screenshots
Screenshot 2024-06-14 114419

Please add the gssoc labels and I would like to work on it under GSSOC'24. Thank you!!

Copy link

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.

Copy link

Hello @SaiTejaswaniBikkasani! Your issue #1612 has been closed. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants