Skip to content

Conversation

Roshan-Metrix
Copy link

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.

@Roshan-Metrix
Copy link
Author

@microsoft-github-policy-service agree
@microsoft-github-policy-service agree company="Roshan-Metrix"

@Roshan-Metrix
Copy link
Author

@microsoft-github-policy-service agree

@Roshan-Metrix
Copy link
Author

@microsoft-github-policy-service agree company="Microsoft"

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.

1 participant