Skip to content

Commit

Permalink
added function handlepaste which prevent user to copy paster from new…
Browse files Browse the repository at this point in the history
…Password to confirm password field
  • Loading branch information
kushalShukla-web committed Feb 20, 2024
1 parent 3b0952c commit 3b1b65c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/AuthPage/SignUp/signupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -279,6 +281,7 @@ const SignupForm = () => {
required
data-testId="signUpConfirmPassword"
value={confirmPassword}
onPaste={handlepaste}
onFocus={onFocusConfirmPassword}
onChange={onChangeConfirmPassword}
type={showConfirmPassword ? "text" : "password"}
Expand Down

0 comments on commit 3b1b65c

Please sign in to comment.