HomeUniteUs
HomeUniteUs copied to clipboard
Update validation schemas
Closes #595
What changes did you make?
- Updated regex in
SignInForm
with special characters regex inPasswordValidationSchema
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.
@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 Got it, makes sense. Thank you! The changes look good so far.