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

Enhancement: Implement User Input Validation for Game Modes #607

Open
bhandareasmita opened this issue Oct 27, 2023 · 1 comment
Open

Enhancement: Implement User Input Validation for Game Modes #607

bhandareasmita opened this issue Oct 27, 2023 · 1 comment

Comments

@bhandareasmita
Copy link

Issue Description:

Current Behavior:
As of now, there is no user-input validation for the gaming modes in the Number Guessing App. This means that users can input any value, including non-integer or out-of-range values, which may lead to unexpected behavior or errors.

Enhancement Request:
To provide a more user-friendly and robust experience, we propose implementing user input validation for both gaming modes. This validation will ensure that users can only select valid gaming modes (1 or 2) and will provide clear instructions or error messages if they enter invalid input.

Proposed Changes:
When the user is prompted to select a gaming mode, we will validate their input to ensure it is an integer.
If the input is not an integer or if it doesn't match any of the valid gaming modes (1 or 2), the user will be presented with a clear error message.
The user will be prompted to re-enter a valid input, thus preventing unexpected behavior and improving the overall user experience.

Expected Benefits:
Improved user experience by preventing invalid input.
Clear and informative error messages for users who enter incorrect input.
Enhanced robustness of the application by handling user input more gracefully.

@Gabriela20103967
Copy link
Contributor

I would like to help to solve this issue, please let me know if is possible.

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

No branches or pull requests

2 participants