Skip to content

Conversation

@niveditasargar
Copy link

Description

Fixes #1164 by adding proper input validation and error handling in the calculator app.

Fixes Implemented:

  • ✅ Invalid operator usage (e.g., 5++3)
  • ✅ Multiple decimals in a number (e.g., 3.4.2)
  • ✅ Division by zero (e.g., 5/0)

Screenshots

Invalid Operator Usage
sct1

Invalid Decimal Usage
sct2

Division by Zero
sct3

Notes

  • Logic added in index.js
  • All validations show proper error messages
  • Tested manually, all test cases passed

@niveditasargar niveditasargar closed this by deleting the head repository Aug 14, 2025
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.

Lack of Input Validation and Error Handling in Calculator

1 participant