-
Notifications
You must be signed in to change notification settings - Fork 645
Description
Describe the bug
In the Armstrong Number Checker project, when I focus on the input field and press backspace (with either no input or just one digit), it shows a browser alert saying “Invalid input.” This alert appears unnecessarily during normal text deletion.
To Reproduce
Steps to reproduce the behavior:
- Go to the Armstrong Number Checker project
- Focus on the number input field
- Type a single digit (or leave it empty)
- Press Backspace
- See the alert message: "Invalid input"
Expected behavior
The alert should not appear when the user is just deleting input (especially if it's empty or partially entered). Validation should only happen when there's actual input to evaluate.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: Latest
Smartphone (please complete the following information):
Not tested on mobile
Additional context
Suggest using inline error message instead of alert(). This improves UX and avoids interrupting the user.