fix: defer email validation to after first blur on signup form#27765
Merged
dhairyashiil merged 4 commits intocalcom:mainfrom Feb 9, 2026
Merged
Conversation
Change react-hook-form validation mode from "onChange" to "onTouched" so that the "Invalid email" error only appears after the user has interacted with the field and moved away, not on every keystroke. Password strength hints still update in real-time since onTouched validates on change after the field has been touched (blurred once). Fixes calcom#19163
Contributor
Author
Before / AfterBeforeBEFORE.Invalid.Email.Message.movAfterAFTER.Invalid.Email.Message.mov |
romitg2
previously requested changes
Feb 9, 2026
Member
romitg2
left a comment
There was a problem hiding this comment.
@AhmadYasser1 Thanks for PR! can you please also add tests
Verify the onTouched form validation behavior: - No error shown while user is typing - Error appears only after blur with invalid email - No error for valid email after blur - Revalidation on each keystroke after first blur
Contributor
Author
|
@romitg2 Does that work? |
dhairyashiil
approved these changes
Feb 9, 2026
Member
dhairyashiil
left a comment
There was a problem hiding this comment.
Thank you for the contribution, definitely a good ux improvement according to me
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Changes
apps/web/modules/signup-view.tsx: Change react-hook-form validationmodefrom"onChange"to"onTouched"Root Cause
With
mode: "onChange", react-hook-form runs the Zod schema validation on every keystroke. This causes the email field to show "Invalid email" as soon as the user types a single character, even though they haven't finished entering their email. This is a poor UX experience that makes the form feel aggressive.Fix
Switch to
mode: "onTouched"which:Test plan
Fixes #19163