From 3b1b65c70737bb7242f769f304511e3e03db36c0 Mon Sep 17 00:00:00 2001 From: kushagra Shukla Date: Tue, 20 Feb 2024 05:27:31 -0500 Subject: [PATCH] added function handlepaste which prevent user to copy paster from newPassword to confirm password field --- src/components/AuthPage/SignUp/signupForm.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/AuthPage/SignUp/signupForm.jsx b/src/components/AuthPage/SignUp/signupForm.jsx index fa47c003..b1784f09 100644 --- a/src/components/AuthPage/SignUp/signupForm.jsx +++ b/src/components/AuthPage/SignUp/signupForm.jsx @@ -77,7 +77,9 @@ const SignupForm = () => { const onChangeConfirmPassword = event => { setConfirmPassword(event.target.value); }; - +const handlepaste=(event)=>{ +event.preventDefault(); +} const validateEmail = () => { if (validator.isEmpty(email)) { setEmailValidateError(true); @@ -279,6 +281,7 @@ const SignupForm = () => { required data-testId="signUpConfirmPassword" value={confirmPassword} + onPaste={handlepaste} onFocus={onFocusConfirmPassword} onChange={onChangeConfirmPassword} type={showConfirmPassword ? "text" : "password"}