fix: Clear error state on focus (#319)
On forgot password page clear email field error state on focus event. On reset password page clear error state of field only which has focused in. Fixes: VAN-505
This commit is contained in:
committed by
Waheed Ahmed
parent
6d31a65eef
commit
ce5ee8863a
@@ -91,6 +91,7 @@ const ForgotPasswordPage = (props) => {
|
||||
value={values.email}
|
||||
handleBlur={() => getValidationMessage(values.email)}
|
||||
handleChange={e => setFieldValue('email', e.target.value)}
|
||||
handleFocus={() => setValidationError('')}
|
||||
helpText={[intl.formatMessage(messages['forgot.password.email.help.text'], { platformName })]}
|
||||
/>
|
||||
<StatefulButton
|
||||
|
||||
@@ -85,7 +85,7 @@ const ResetPasswordPage = (props) => {
|
||||
};
|
||||
|
||||
const handleOnFocus = (e) => {
|
||||
setFormErrors({ [e.target.name]: '' });
|
||||
setFormErrors({ ...formErrors, [e.target.name]: '' });
|
||||
};
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
|
||||
Reference in New Issue
Block a user