-
Notifications
You must be signed in to change notification settings - Fork 8
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
Login using email address #397
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,20 +50,24 @@ const SignIn = () => { | |
} | ||
|
||
return ( | ||
<form className='sign' onSubmit={handleSubmit(onSubmit)}> | ||
<form className='sign' onSubmit={handleSubmit(onSubmit)} noValidate> | ||
<h1 className='welcome'>{welcomeBack}</h1> | ||
<div className='container'> | ||
{error && <div className='error'>{error}</div>} | ||
<Input | ||
placeholder='Username' | ||
type='text' | ||
placeholder='Email' | ||
type='email' | ||
name='username' | ||
id='username' | ||
autoFocus='autoFocus' | ||
ref={regi({ | ||
required: { | ||
value: true, | ||
message: 'You must enter username' | ||
message: 'You must enter email' | ||
}, | ||
pattern: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. email pattern will not be required as input type should do that |
||
value: /\S+@\S+\.\S+/, | ||
message: 'You must enter valid email' | ||
} | ||
})} | ||
errors={errors} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,21 +69,25 @@ const ForgotPassword = () => { | |
|
||
return ( | ||
<SignLayout> | ||
<form className='sign'> | ||
<form className='sign' noValidate> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. validation should not be removed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed noValidate and changed email field type to text. |
||
<h1 className='welcome'>Forgot Password</h1> | ||
<div className='container'> | ||
{confirmErr && <div className='error'>{confirmErr}</div>} | ||
{resendErr && <div className='error'>{resendErr}</div>} | ||
{message && <div className='message'>{message}</div>} | ||
<Input | ||
placeholder='Username' | ||
type='text' | ||
placeholder='Email' | ||
type='email' | ||
name='username' | ||
id='username' | ||
ref={regi({ | ||
required: { | ||
value: true, | ||
message: 'You must enter username' | ||
message: 'You must enter email' | ||
}, | ||
pattern: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pattern validation will not be required |
||
value: /\S+@\S+\.\S+/, | ||
message: 'You must enter valid email' | ||
} | ||
})} | ||
disabled={false} | ||
|
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.
why is validation error removed?