HomeUniteUs icon indicating copy to clipboard operation
HomeUniteUs copied to clipboard

Update validation schemas

Open mira-kine opened this issue 1 year ago • 2 comments

Closes #595

What changes did you make?

  • Updated regex in SignInForm with special characters regex in PasswordValidationSchema

Testing done for these changes

  • Tried signing up with special characters not explicit in SignIn but passes in SignUp, then tried signing back in. SignIn button was disabled until I used the same regex code for both.

mira-kine avatar Sep 19 '23 23:09 mira-kine

@paulespinosa the utils validation schemas is not shared across the components because we are validating differently here. In SignUp, we are using Formik + Yup to check that a user inputs a valid password before it is entered into the db, but for SignIn, we are only validating that there is a password at all. We had made this change after I made my PR, so I forgot to update it. Good catch - the PR should be updated with these changes now. I also updated the PR with the regex changes. Will be pushing up tests on SignUpForm special characters next.

mira-kine avatar Sep 25 '23 23:09 mira-kine

@mira-kine Got it, makes sense. Thank you! The changes look good so far.

paulespinosa avatar Sep 26 '23 02:09 paulespinosa