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

Fix: display validation errors correctly for both email and password when invalid #1715

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ToseebNadaf
Copy link

@ToseebNadaf ToseebNadaf commented Jan 15, 2025

PR Fixes:

  • Added Zod validation for email and password.
  • Replaced useRef with useState for better state management.
  • Memoized handleEmailChange with useCallback to prevent unnecessary re-renders.
  • Implemented client-side form validation before sign-in attempt.
  • Mapped error responses to display meaningful error messages.

Resolves #1714

Checklist before requesting a review

  • [✅] I have performed a self-review of my code
  • [✅] I assure there is no similar/duplicate pull request regarding same issue

Before -->

error_before.mp4

After -->

cursorful-video-1736974544915_2_2.mp4

@ToseebNadaf
Copy link
Author

@devsargam suggest any changes if needed

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.

bug: validation errors not showing correctly if both email and password are invalid.
1 participant