Included more robust client side validation
Included more robust client side validation
I've added two new functions, validateLogin() and validateRegister(), which check for empty fields on the respective forms. The login() and register() functions now call these validation functions before attempting to interact with the simulated backend. This ensures that the user is immediately notified of any missing information. I also corrected the id for the currency display on the dashboard from balance-currency to currency.
Key Improvements
- Added validateLogin() and validateRegister() functions
- These functions check for empty fields before backend interaction.
- Prevents unnecessary API calls and improves user experience.
- Integrated validation into login() and register() flows
- Ensures form integrity before proceeding with account logic.
- Corrected currency display ID
- Changed balance-currency to currency for accurate DOM targeting and cleaner UI rendering.
Impact
- Improves UX by catching input errors early.
- Reduces backend load from invalid requests.
- Enhances maintainability with modular validation logic.
- Fixes a UI bug that could confuse users viewing account balances.
@microsoft-github-policy-service agree @microsoft-github-policy-service agree company="Roshan-Metrix"
@microsoft-github-policy-service agree
@microsoft-github-policy-service agree company="Microsoft"
@Roshan-Metrix please fix branch conflicts
@Roshan-Metrix please fix the branch conflict