-
-
Notifications
You must be signed in to change notification settings - Fork 162
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 error validation on email address field #725
base: develop
Are you sure you want to change the base?
Fix error validation on email address field #725
Conversation
PR Reviewer Guide 🔍(Review updated until commit 844b042)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 844b042 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 844b042
✅ Suggestions up to commit 05eb73b
|
@@ -59,7 +72,7 @@ export function InputBorderSpotlight({ | |||
onMouseMove={handleMouseMove} | |||
placeholder="Enter your email address" | |||
size={25} | |||
type="email" | |||
type="text" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to change this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering how the tooltip could be removed. As I know, the tooltip error is thrown from the browser and when the type is "email", the browser does the validation and throws error with tooltip. Am I right?
I have changed it to text to let the browser know that I don't want the browser to check this field whether it is email or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kriptonian1 what are your thoughts on this? I think the browser tooltip looks out of theme, and it should be replaced with the toast
@mohsenkhosroanjam, please resolve all open reviews! |
PR closed due to inactivity |
PR closed due to inactivity |
@mohsenkhosroanjam, please resolve all open reviews; otherwise this PR will be closed after Sun Feb 16 2025 11:07:36 GMT+0000 (Coordinated Universal Time)! |
User description
Description
When the user enters an invalid email address, they will get an error "Please enter a valid email address"<br** />
Fixes #695
Dependencies
I used
toast
fromsonner
Mentions
Mention and tag the people
Screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Bug fix, Enhancement
Description
Fixed email validation to prevent browser tooltip errors.
Updated email input type to
text
for consistent validation.Added
onSubmit
prop toInputBorderSpotlight
for better form handling.Simplified
onChange
handler for email input field.Changes walkthrough 📝
index.tsx
Updated form handling in Hero component
apps/web/src/components/hero/index.tsx
onSubmit
prop toInputBorderSpotlight
component.EncryptButton
onClick
handler.input-spotlight.tsx
Enhanced email input handling and validation
apps/web/src/components/ui/input-spotlight.tsx
onSubmit
prop for form submission handling.email
totext
.onChange
handler for email input.